Solar panels produce solar energy. These panels produce electricity through the photovoltaic effect. The photons of the sunlight knock off the electrons from the atoms, essentially creating electric flow. In other words, the panels convert light energy into electrical energy.
The panels are made of semiconducting material, which is generally silicon. This material is the element that produces electric charges.
Now, this electricity is Direct Current (DC). It has to be converted into an AC Current that the electrical appliances in your home use. This is achieved through an inverter or micro-inverter depending on the size of the solar energy system in your home.
At homes, the inverter ensures that solar power is primarily used and only when it is not available, the electricity from the grid is used.
You do not have to switch anything on or off. The solar panel system works seamlessly. You may have to change the angles of the solar panels, depending on your location or time of the year.