Cold water flows from the tank to the solar collector (usually on your roof). In a hiline system where the tank is mounted on the roof above the collectors, cold water flows naturally into the collector because it is heavier than hot water.
The solar collector is made of materials that absorb heat from the sun very efficiently. The cold water travels through the collector and the heat in the collector heats up the water, which returns to the tank.
Hot water rises to the top of the tank and colder water is taken from the bottom and returned to the solar collector. When you use hot water, it is taken from the top of the tank where the water is hottest.