It's simple It works the same way aircooling works, but much better as water is a better conductor of heat.
In an aircooler, you have the heatsink, which is attached to the heatsource (GPU, CPU). This heatsink has fins on it to increase the surface area of the heatsink. This provides more thermal interface between the heatsink, and the cooling agent (Air). A fan blows air across the thermal interface of the heatsink, thereby clearing away the heat from the heatsink, and allowing it to draw more heat from the heat source.
Liquid cooling does the same basic thing. Except, the heatsink has channels inside of it to allow the liquid to flow around the surface area of the "fins" inside the heatsink. The liquid that is inside is moved around the loop by a pump which takes the liquid from the heatsink(s) up to a Radiator which functions exactly the same way as the air cooler noted above. The Fins on the radiator suck the heat out of the water, and fans blowing through the radiator cool them off, thereby removing heat from the liquid, which then goes back through the loop to the heatsink to repeat the whole process. Liquid cooling works much better than air cooling because liquids used in watercooling loops are way better conductors of heat than air.