Iot application(esp8266) for controlling home devices

i want to turn on fan which is connected to home internet through esp8266
can i turn on that fan from another town
help me in this project

Yes you can. You can even turn on the fan from another country or continent. But before that, and before asking for help with such a project, this is a must:

http://docs.blynk.cc/