It does both.

But if you don't have lots and lots of sun during the day (like 12 hours or more of direct sun) you'll not see a huge increase.

Still, if you really want to heat your pool, combine solar panels with the solar cover.