Why this Portugese town is one of the best places to surf in the world

The enormous waves at Nazare, Portugal are the source of several surfing world records, but why is this quiet seaside town home to such huge waves?