Some bars, especially in Granada and Madrid, will include a plate of assorted tapas whenever you order a drink. The bartender will pour your drink and also select a few random bites from the buffet of tapas he has sitting behind the bar.
If tapas are not included with your drink then you must order them separately. A plate of tapas can cost anywhere from €3-€5 ($4-$6) but you'll pay up to €12 ($14) for seafood. If you're with a group you can also order a larger portion called "raciones" which come on a dinner plate rather than a saucer plate. Some places will also have 1/2 sized raciones called "media-ración".
To start, you could get an inexpensive sampler plate by asking for "una tabla de canapés variados". You could also order an assortment of meats (surtido de charcuterie) or cheeses (surtido de queso). If you're feeling adventurous, order a banderilla (named after the spear matadors use to spike the bull) which is a small skewer of spicy picked vegetables.
Don't worry about paying until you're ready to leave. The bartender will keep track of your tab. When you're ready to leave, just simply ask for for "la cuenta".