It's 30 days on arrival. At the end of this period you can extend the visa for a further 30 days by visiting the immigration department at the airport (separate building from the terminal) and paying (I think) 100QR. When the extension expires you must fly out of the country, but you can just hop to Bahrain or Dubai and come straight back to Doha and get another visa upon arrival, thus starting this process again from the beginning. I'm a UK passport holder and have done this many times in the past.