If you plan to stop over in Qatar temporarily (up to 24 hours) on your way to a destination, you should apply for a transit visa before you travel. The visa is valid for 24 hours and allows you to leave the airport transfers area to stay in Qatar.
The Transit Visa is also handy for workers whose job requires a short stay in Qatar, for example, seamen and truck drivers passing through Qatar. However, a Transit Visa is not acceptable for general business visits.
Transit Visas can be arranged through your local Qatari embassy prior to travel. Embassy workers and other authorized persons can apply online for transit visas on behalf of travelers.