Explain briefly how solar energy is used to generate electricity

This when the energy from the sun is trapped by either sun panel or others. It passes through conventions then we get the energy out as electricity.