As previous poster said, just queue up at immigration in the arrivals terminal, and you will be charged 100 QAR (approx US$27) each for an entry visa. Payment only possible by VISA or Mastercard. No cash and no other types of cards are accepted.
There is no such thing as a Qatari Transit Visa - people of any nationality can transfer at Doha airport. You are not just transferring/transiting - you actually want to enter the country.