Depending on the nationality, entering Dubai with visa on arrival is either free or you have to actually buy a visa. If you have to buy a visa, you will do it from a currency exchange or kiosk in the back of the passport hall, and then go get in line to get processed. If you don't have to, you just get in line and present your passport.
For Qatar, last time I was there it was the same QR 100. You just get in the regular passport line, and when its your turn, they will collect the fee from you by credit card on the spot./