Check out this graphic from FAFCO, the leader in solar pool heating, on how a solar pool heater works!
A solar pool heating system uses your existing pool filtration pump to send cool pool water to solar panels that heat the water. The heated water then returns to your pool. A diverter valve is installed to bypass your solar pool heater when your pool is warm enough, or when the climactic conditions do not permit the solar heater to work effectively. An optional electronic control panel can automate the operation of your diverter valve. If you have an existing pool automation system, the solar pool heating system will work with it!