If you mean the visa on arrival so you can leave the airport on a stopover:
You get it from the immigration desk, QAR100 payment by credit card only. You're supposed to have a hotel booking to show them, but after a little muttering amongst themselves, a flight out later that day was sufficient.
Youre not supposed to get the hotel if you choose a longer layover, although when I approached the reception at DOH to ask about visa on arrival, they were all set to find me a room until I said i just wanted to go wandering around Doha.