There are two main types of solar panel. One generates electricity and the other is used to heat a fluid to assist with domestic hot water heating.
PV or ‘photovoltaic’ panels harness the sun’s light energy and convert it into an electric current. This is fed via an invertor into your mains power supply and is to all intents and purposes ‘free electricity’. If more is generated than you require then it is made available to the national grid who pay you for it by way of a discount to your monthly bill.
Solar water heating panels do not generate electricity but instead use the sun to heat a highly efficient thermal liquid which is pumped from the panel into a second heating element inside your domestic hot water tank. This helps raise the temperature of the water and in doing so reduces the amount of gas consumed by your boiler. Again a ‘freely’ available source of energy. It is likely that in both cases you will need to maintain systems with annual service checks.