This guide quickly explains how to flash a program on ESP8266 using Arduino IDE, in less than 5 minutes. First of all, you need to install the ESP8266 board in Arduino IDE, following the 2 steps below: add the repositories link inside File -> Properties (http://arduino.esp8266.com/stable/package_esp8266com_index.json), and then add the board, using Board Manager.
Then, connect the FTDI (USB to Serial) adapter, to the ESP8266, as below. As power voltage, be sure to use 3.3V (and not 5V!), to avoid destroying the board. I suggest using a breadboard, as I did below. RX and TX wires can be connected directly. The 3.3V pin of the FTDI adapter should be connected to both VCC and CH_PD, while 0V pin should be connected to both GND and GPIO0, in order to set the ESP8266 into "bootloading" mode. RST and GPIO2 pins can be left floating.
#define ESP8266_PIN 1
#define DELAY_TIME 500
Flash the board using the following parameters.
At the end of the flashing, the following message appears. It takes about 30 seconds - 1 minute to complete the flashing. After flashing, the program execution starts automatically (ESP8266 exits "bootloading" mode and enters "usage" mode). However, if you disconnect the 3.3V and reconnect again, in order to avoid booting in "bootloading" mode again, you should connect the GPIO0 pin to 3.3V, so that ESP8266 starts in "usage" mode.