Updated April 2016
The majority of Spanish people do not tip, and when they do it is often no more than the small change left over from the payment of the bill. A Spaniard, once resident in the UK where he worked as a waiter, confessed to me that he was always disappointed to serve his fellow countrymen because they rarely left a tip.
However, Spain receives a huge amount of foreign tourists, who tend to tip as they do in their own country. Many expatriates living in Spain follow their old customs and leave a tip as they did back home.
In many countries, as the salary of unskilled workers in the transport, catering, and tourism industry is low, tips are always welcome, if not expected. Spain is somewhat different inasmuch as waiters are usually well-trained and receive a reasonable salary, to which are added many social benefits.
In any case, if there is a service charge already included in the bill, there is no need for an additional tip, although, as before, foreigners often overlook the surcharge and waiters hope for something extra.
My advice: don't tip for drinks or coffees, on their own, even in up-market places, other than the small change, say 20c for a €3.80 bill; for meals, again, leave the small coins, and up to around €1 per person (which in fact may be close to 10% for a lunch-time Menu...), or in more expensive restaurants, where you may have received excellent service, anything up to 5%.
In taxis, it is not customary to tip, but if you do, it will be welcomed. Use the same criteria as for restaurants. Don't tip for the handling of your baggage as you will be charged for it, anyway.
The philosophy is pretty much the same for hotels, but tip the porters and bellboy if they take your luggage to the room; give them something like €1 per bag (but not more than €5). This applies especially in luxury establishments.