What I would do is check the lighting of a relay using an app on my Android smartphone. I would also like to make my android comunicate with the relay using the WiFi esp8266 module (in my case the model 1).
Now, I searched a lot on the internet to get as information as possible, but the result I got is rather to greater confusion.
I saw that often is used the app-inventor site to create apps and I have also seen that these apps connect to esp8266 through the SSID and password (correct me if I'm wrong).
The real question is: how can I program the module, using the Arduino IDE, so that I can control the relay? I'd find any guide that allows me to learn the programming of this module (as I can not find anything) because by just looking examples already made I can not understand the use of functions and this gives me much hassle.
Thank you all for your attention and for taking the time to this post.
It sounds like you're trying to run before you learn to crawl. The first thing you need to decide is how you're going to use the ESP8266. The options are to program the ESP8266 using the ESP8266 Arduino core or to program a standard Arduino board such as Uno, Mega, Leonardo, Pro Mini, Nano, etc. to communicate with the ESP8266 module running the AT firmware using Serial commands. If you don't understand what I just said you should probably forget about your ESP8266 for a while and just get a standard Arduino board and learn the basics on it.
ardukiwi:
(in my case the model 1).
Here's something you need to learn immediately. I'm pretty sure there's no such thing as an ESP8266 "model 1" I'm guessing you mean the ESP-01 module. If so you need to say that. With programming it's essential to be very precise. The compiler isn't going to say "yeah it's cool, I know what you meant to write". If you want help here you need to take the same approach.
If you're going to program the ESP8266 directly then the ESP-01 is not the easiest choice. You're better off with a standalone ESP8266 board such as the WeMos D1 Mini or NodeMCU boards. These have the USB-serial chip built in so you can just plug them right into your computer with no extra hardware. They also have all the GPIO pins broken out.
If you're using the ESP8266 in combination with a standard Arduino board then the ESP-01 module is a reasonable choice, though an ESP8266 shield may very well be worth the extra expense for the sake of beginner friendliness.