In case you want to see how to control lights, tv, windows, door with relay, you can check my new project ESP8266EX Cheap Relay Module.
I recommend you to watch this video, maybe it will be easier for you to follow.
Otherwise, follow steps bellow.
We will connect LED to NodeMCU and write a simple program that will make LED blink every second.