The sun is at the origin of the winds. The sun illuminates the Earth and warms it up locally. Where land, or sea water, is heated, the air also heats up. Warm air is light and rises. From where the hot air rises, a slight lack of air is created, a zone where atmospheric pressure is slightly lower. Where land, or sea water, is cold, the air is also colder, heavier and remains on the ground. This cold air then flows to the warm zone where hot air created a lack of air. The cold air is then heated by the land and goes in the loop again. As in a large pan, hot air rises in the middle, above the fire, goes to the colder edges, goes down to the bottom along the edges and goes back to the middle of the bottom of the pan, to enter the loop again. The rotation of the Earth deviates the wind loop in a complex way and divides it into three loops between the equator and the pole.
Also a great video from ESA on basic wind physics : https://www.esa.int/spaceinvideos/content/view/embedjw/502764
sea breeze : In the morning, the land in the sun warms up faster than the sea. The air above the land heats up and rises. The air above the sea, colder, takes its place. The wind blows from sea to land.
land breeze : In the evening, sea water remains warm while land cools down quicker. The air above the sea is hot and rises. The air above the land cools down and takes its place. The wind blows from land to sea.
sea breeze, photo Francesco Marchetti, https://franzm60.wordpress.com/