In Solar Energy applications (as in all renewable energy applications) energy is taken from a never ending, and free source, and is converted by some technology into a usable format to be used by that particular application.
In the case of Thermal (solar water heating energy), it is extracted from the sun and converted to thermal energy via the collector. The heated water is transported to a storage tank (mostly geysers) either through thermoshiphon or by means of a circulating pump. A controller is used to optimize this process and this unit would incorporate a so-called delta-T function, and a timer facility to control the heating element of the tank.
Heat pumps is another technology that is used to heat water, and it replaces the electrical element of the geyser (storage tank), giving three times more heat when using the same amount of electricity that would have been used by a traditional electrical element.
Sun energy is converted directly into electricity in Photovoltaic applications such as PV Panels, thus providing free power or energy (off the electrical grid) and can be stored for later use via solar batteries.