There are many types of Inverters to build. Once you build one inverter, you can light bulbs, or other electrical equipments by battery.
But, you had to do a boring thing that is manual changeover. That required you to plug in equipments in inverter when powercut and turn on inverter manually. And when mains came back you had to turn off inverter, and plug the equipment back to mains.
The following circuit will do that job automatically. It does the following,
When mains are on: Equipments are connected to mains
When mains are off: Equipments are connected to Inverter and inverter is turned on.
It requires a DPDT relay or 2C relay and a power adapter that can run the relay by mains.
Have a look on the image below to get an overview of the working process of this setup, automatic inverter and mains supply changeover.