Just as in Britain and probably every other democratic country, you need to be on the electoral roll to vote in Spain.
In Britain you get a form through the post to fill in detailing the occupants of your house who are eligible to vote. Here you have to visit the location where you normally would vote to inspect the details on record. This you can do between the 2nd and 9th November.
For Spaniards this is important because there will be a General Election held on the 20th December. We Brits though are not eligible to vote in General Elections in Spain so for us this is not urgent.