There are 3 types of solar panel systems –
Grid connected or on-grid systems – These are solar systems that are connected to the building mains directly. These systems give priority to the solar power generated and only if the generated power is less than that required, will the grid power be used. In a grid connected system,  you are eligible for net-metering, a process where any excess power that you produce is fed back to the grid and you receive a credit for the same. In case you generate more than you consume in one complete year, the electricity distribution company (DISCOM) also pays you for the excess units generated. In many states, Net Metering has been made mandatory to avail subsidy for solar.
Off-grid solar systems are those which are set up independently from the electricity grid. These systems have a battery backup system which is charged by the generated solar energy. During the day when the generated power is more than the power being consumed, batteries are charged. During evening & night the electricity from the battery is used to run all home appliances. These systems are generally more costly than on-grid systems and have lower efficiency. The battery needs to be replaced every five years or so. Off-grid systems are perfect for your rooftop solar plants if you have a very erratic power supply or do not get any power at all.
A hybrid system brings the best of both worlds and is a combination of an on-grid and off-grid solar system. Hybrid systems have a battery backup which helps store the generated energy. What differentiates hybrid systems from off-grid systems is that, once the battery is fully charged, any excess power generated which is not being utilised will be fed back to the grid and the you will get suitably compensated.