How can I get a medical card in Spain?

To obtain the Spanish medical card (TSI, Targeta Sanitaria Individual) you need to be registered in your Town Hall with Empadronamiento for a minimum of 3 months and be a resident or have a TIE.