Farmacias take turns to provide an out-of-hours service (at night and for holidays) as the farmacia de guardia. You will be able to find out which one is open by looking in a local paper or in the window of any pharmacy where they usually display a list.
Pharmacists in Spain are more highly-trained than in some countries and will provide treatment advice for many common illnesses and ailments, but they are not a substitute for going to a doctor if there is something really wrong with you.
Spain is quite unrestrictive when it comes to the distribution of medications that are strictly prescription drugs in other countries (such as antibiotics), so these are commonly available over-the-counter. Medicines tend to cost significantly less than in other countries due to state imposed price restrictions.
However, due to the passing of the Royal Decree Law in 2012, anyone with an income greater than €18,000 a year should now pay half the cost of the medication. Those who make less than €18,000 will pay up to 40% and pensioners making less than this amount will need to pay 10% with a maximum monthly payment of 8 euros. Pensioners with incomes of more than €18,000 per year must pay a maximum of 18 euros per month. Since the law in the individual autonomous communities overrides such a law, this law applies to most, but not all, the autonomous regions. For more on health and medicine in Spain, visit our website on expatriate healthcare and insurance: http://www.expathealth.org .