If you are a EU citizen, you will be able to vote in the municipal elections. Also you can be elected to office.
If this appeals to you make sure you present yourself at your local Town Hall immeditaley to inscribe yourself in the padron (the list of local residents). You want to be empadronado, or inscribed and received a certificado de empadronamiento a registry certificate for the municipality.
Some months before the elections make sure that you appear on the voting list, otherwhise you will not be permitted. The municipal elections take place each 4 years.