Sea breeze and land breeze.
When sea is cooler than land, the wind blows the cool air up to the land, which on a beach has no structures to stop it, thus, it's cold.
Opposite works for land breeze.