How to empadronar-se in Barcelona

El Padró d'habitants... What is it and how do I get it?