What are my rights in Spain when it comes to noisy neighbours?

Noise is part of daily life in Spain, but what can you do if you're constantly being bothered or woken up by a neighbour’s banging or a dog barking? Here is a round-up of the laws protect you and the steps to take action.