When seawater warms up, it evaporates into the air. The salt in the water does not evaporate. The relatively warm air rises and moves towards the land via the atmosphere. Upon arrival, the warm air must rise up because land lies higher than the sea. This rise costs energy, the air temperature decreases. Cold air cannot contain as much water vapour as warm air, so the excess vapour condenses (cloud forming) and falls as precipitation on land. The water returns in the direction of the sea in various ways. It can evaporate in the atmosphere, it can flow back to the sea via the rivers and it can be transported underground in the form of streaming groundwater.
Once in sea, the water enters into an enormous complex of sea and ocean currents. A water molecule can easily make several trips around the world along various coastal waters and deep seas before it ends up once again as water vapour in the atmosphere. The water in the oceans traverses the water cycle an average of once every 3850 years.