To the File->Preferences->additional boards manager, close & re-open the IDE
Got to Tools->Board Manager, and look for the ESP8266 core and install a version of it. Some people favor older versions, but i know of no known issues on the newer ones (other than that they are growing in size)
then select the board you are trying to use. What board is it ?