A bay is a body connected to an ocean or lake or a bay is a curved indentation in the coastline made by the sea. And a beach is formed by the deposition of sand, gravel and pebbles on the shore. So when there is deposition of sand , gravel and pebbles on the coastline or the shore, a beach is formed. It doesn't matter whether it is a bay or not. Generally a beach is formed when the sea is calm and the air is of low velocity. These features are generally found near a bay and that's why many bays feature a beach.