A solar cell is an electronic device that produces electricity when light falls on it. The device has a positive and a negative contact between which the voltage is generated and through which the current can flow. You connect these contacts to whatever it is you want to power.
Solar cells have no moving parts.
Effectively they take light energy and convert it into electrical energy in an electrical circuit, exploiting a physical process known as the photovoltaic effect. The discovery of the photovoltaic effect is credited to the French physicist, Edmond Becquerel, in 1839. He found that by concentrating the sun's light on one side of a battery the output current of the battery could be increased. In 1883 an American inventor produced a solar cell from a material called selenium, but it was very inefficient. Selenium became used in light-exposure meters for cameras, but not for power production.