This tutorial explains in depth ESP8266 Flash File System Called as (SPIFFS). There are two ways to store data on ESP8266 one is using internal EEPROM which is of 512 Bytes but you can write data 1 millions of times (no file system). and Second is use of SPI Flash (64kBytes to 3Mbyte), when you see ESP-01 a small 8-Pin Chip is present near to the ESP8266 which is FLASH memory connected to ESP through SPI. In this flash memory ESP stores the program. Along with program you can store your files on it. Limitation of this memory is it has only 10000 (ten thousand) write cycles.
Even though file system is stored on the same flash chip as the program, programming new sketch will not modify file system contents. This allows to use file system to store sketch data, configuration files, or content for Web server. Continue reading Example of ESP8266 Flash File System (SPIFFS)