Headlands and bays form along discordant coastlines which have alternating bands of hard and soft rock. The less resistant rock (soft) is eroded much faster as it is weaker which forms a bay with a gentle slope. However, the more resistant rock eroded a lot slower as it is stronger so it juts out forming a headland with steep sides.