All major public areas, from hotels to airports, have facilities, though the more public the area, the less likely they are to be clean. The words for "restroom" are servicio and baño. "Men" is caballeros; "women" is mujeres or damas.
The most reliable restrooms are in good hotels. No one minds if you choose to use one and you're not a guest of the hotel.