You will need to obtain an N.I.E. Number ( numero identification extranjero) this is necessary to allow opening of bank account , house purchase, connection to services I.e. Electric, water, car purchase, etc. This can be obtained in the town or district that you decide to live in. Or via Spanish embassy / consulate in the U.K.
probably best to rent in the area you choose to live in first before buying as this gives you chance to discover ups and downs of living in a new country and move on if you aren't finding what you need or like in terms of lifestyle.
You also need to understand your " status " in terms of being resident or non resident in Spain . In either case you do become liable for taxation payable to hacienda ( Spanish Revenue similar the HMRC ) if you arrive in Spain immediately intent on living full time then you are a resident . Otherwise you are non resident up until you overstay a certain number of days in one year , I think it is 180 days but others on this forum will perhaps know accurate criteria .
lastly, avoid using a solicitor associated with the property seller or estate agent. Get an independent one who is more likely to correctly look out for you and your interests instead of the sellers.
good luck.