When a buoy is placed on the water, it displaces a certain volume of water, which creates an upward buoyant force. This buoyant force opposes the weight of the buoy, causing it to float on the surface. As the buoy floats, it experiences variations in the water's density and wave action. Changes in water density, caused by factors like temperature and salinity, can affect the buoyant force acting on the buoy. Additionally, waves passing by the buoy can temporarily alter the water level, causing it to bob up and down.
In summary, an ocean buoy bobs up and down due to variations in water density, wave action, and the principles of buoyancy that determine its floating behavior.