When Sun rays are incident on the Solar Photo Voltaic (PV) panel, the tiny PV cells produces a potential difference across its terminals when hit by the photons (Which are present in light rays).
The voltage so generated by each tiny solar PV cell is accumulated by connecting them on the panel and two terminals come out of each panel as the DC voltage terminals. So, you can treat each of the solar panels as a Battery giving out variable power proportional to the intensity and angle of the incident sunlight.
These panels are grouped together and the power generated is brought at one point. The generated power is DC (Direct Current) and needs to be converted to AC (Alternating Current). This is achieved by Solar Inverter.