Arduino listens for serial port communication on its hardware serial port.
Then it sends every received line of data trough software serial port to ESP8266.
ESP8266 puts every received line of data into circular buffer.
ESP8266 also runs code for webserver and a website which pools the buffer for new data and displays it on the website. (Sadly there is no websockets support for ESP8266.)