When the rays of the sun fall on solar modules placed on the rooftop of houses, commercial building or industries, the individual cells inside the module help convert sunlight into DC electricity. However, most appliances in our home work on AC electricity, and therefore the modules are connected to an inverter which does this conversion. Once the conversion has happened, the output of the inverter which is AC electricity, is connected to the mains of your home to allow you to use solar energy.
It is important to note that you can use electricity from your rooftop solar power plant in conjunction with the electricity sourced from your DISCOM. This kind of arrangement is very common and one that solar installers are expert at managing. However, if you want to go with a system that is backed by a battery to help you use solar at night time, you must go for a hybrid or an off grid system