If you live in the UK and have paid sufficient National Insurance you can claim a state pension when you reach retirement age.
You can also claim your Spanish pension, completely separately, according to Spanish rules.
However it may be possible, and possibly advantageous to combine the two. When you come to claim you will be asked questions that allow this to be considered, and implemented if appropriate.
There's some (rather general) information here:
http://www.thepensionservice.gov.uk/ipc/faqs.a sp#five