If you are in Spain and in need of accessing the internet, look for a Locutorio. This is where you can use the internet, make phone calls or even make photocopies.
But beware, this is also where pickpockets and thiefs pray on tourists. Keep your hands on your bag/purse/backpack at all times! Even putting your stuff on the floor right by your feet may not be good enough to keep a slick thief from robbing you and disappearing before you even notice all your stuff is gone!
And one last hint, if worse comes to worse and you get robbed, definitely file a police report in case any of your possessions are found. There is a police station on C/Leganitas just off Gran Vía near Plaza de España.