In a bar:
Spain is a lovely wine country. There are all sorts and qualities of domestic wine, foreign wine is not very common. The average bar has three standard types of wine, all cheap and usually of good quality:
"Un tinto, por favor." Tinto is a standard red wine. Served in a low cut glass and costs around 0,6 € / 0,5 $. The tinto has no outstanding qualities, so don't expect too much. Slightly better than table wine.
"Un blanco, por favor" Blanco is white wine. Again, not the most superb of wines, but totally enjoyable. The white wine wine is usually served a little bit chilled, and is half dry to taste. Same price as the tinto.
"Un rosado, por favor" The rosado is a rose wine, typically lighter than red wine and much more refreshing. The rosado is a bit more feminine than the other wines, more ordered by women. Doesn't change the taste, it's great! Rosado is nice in the spring, just before the white wine season. Same price as the tinto.
If you eat at the same place (Many bars have a dining hall in the back), simply asking for wine to the meal will provide you with a good table wine. The table wine is most likely to be from Navarra or Rioja, of a slightly less quality than what's served in the next room.
In a restaurant:
Besides the bars, you have the highbrow restaurants called degustacion, or 'enjoyment'. These are typically more expensive than your average bar, cerveceria, polloria or any other inexpensive place. At the degustacion you'll be given a wine chart like in a US or UK restaurant where you can choose the wine or go for a recommendation from the wine master of the house.