The coast is shaped by waves and rocks.
The waves break on the coast, and wear away the softer rocks more easily. As a result, the places where there are soft rocks are scooped out and form bays.
The harder rocks are worn away less quickly and stand out to sea as headlands.