Public health care
Foreign employees working for Spanish companies or self-employed foreigners in Spain must usually contribute to Spanish social security (Seguridad Social). Those contributions entitle both you and your family to free or subsidized medical care on the same terms as Spaniards.
After you have registered with Seguridad Social, you will receive a registration card (cartilla de la seguridad social or tarjeta sanitaria) usually by post around 4-8 weeks later. In some cases, you might have to pick your card up at the nearest Centro de Salud. A married couple with one partner working are covered by the same social security number, as are all dependents (e.g. children under 16) that are listed on your social security card. For further information, get in touch with your local Tesorería General de la Seguridad Social (TGSS).
If you are a European Union citizen, you are automatically entitled to free basic healthcare in Spain due to reciprocal agreements among EU countries. Since the 1st June 2004, European citizens who are travelling within the European Economic Area are given a European Health Insurance Card (EHIC), which simplifies the procedure when receiving medical assistance during their stay in a Member State. The EHIC replaces forms E111 and E111B, E110, E128 and E119. However, the EHIC is invalid if the purpose of the stay is to receive medical treatment.
Private health care
With respect to private insurance, anyone is eligible. These companies typically offer both medical and dental coverage with a discount if you sign up for both. Obviously, prices vary greatly according to the age and sex of the applicant; however, it is not prohibitively expensive. To give you an idea, the average monthly medical premium for a 30-year old male starts around €40 per month; for females it's a bit a higher at roughly €50 per month.
For more information on expat health, insurance, health care and related issues in Spain, check out our expat health blog at ExpatHealth.org .