Uk & European non-resident visitors
If you're below retirement age and on a short visit to Spain from the UK, EU or some non-EU countries, you're entitled to free or reduced cost emergency medical treatment. This will be equivalent to the treatment Spanish nationals receive, though it may vary from what is offered in your country of residence.
Before you are treated you'll need to produce a European Health Insurance Card (EHIC, known in Spain as a Tarjeta Sanitaria Europea) which has replaced the former E111 form, and several other healthcare forms.
Living but not working in Spain
If you decide not to work in Spain it is now possible to make monthly payments which will then entitle you to the state healthcare. The payments are approximately 90€ per month. For this you are fully covered in the Valencian region to any medical treatment that you need. you will then also be entitled to the european healthcard which will be needed if traveling anywhere outside of the Valencian region.
Living and working in Spain
If you are planning to live and work in Spain then you will have to pay contributions such as social security and autonomous. The autonomous payment is made monthly and is approximately 245€ a month. The autonomous is the equivalent to the national insurance payments in the uk and once you are paying this you are entitled to full state healthcare. You will be given a SIP card which you will need to present everytime you visit the doctors or hospital.