As the air over the land gets much hotter than the air over the water, that warmer air rises. The air over the water remains cooler and more dense than the rising air over the land, which then encourages the cooler air over the water to move inland to replace the rising warm air.