Near the combustion chamber of the cylinder, there is a "water jacket", which is the passage of coolant in the cylinder, and the liquid circulates here to take away heat to cool the engine. The water that absorbs the heat of the engine and increases in temperature is cooled by the radiator and then returns to the engine to cool the engine.
Water-cooled engine is the mainstream of motorcycle now, because it can cool the engine more effectively than air-cooled engine. Water-cooled engine has more components and more complex structure than air-cooled engine, and there is also a water jacket for flowing coolant.