For the actual tourist visa you will need to leave the country and apply at an embassy/consulate for the visa, I usually use Kuala Lumpur in Malaysia but you need to book an appointment in advance here. The process can take
***
days it is not like the border bounce.
The other option is doing a border bounce, some borders you will be able to exit and re enter the same day some you will have to spend the night or two on the non Thai side and then extend it for another 30 days at your local immigration office for 1900 baht, essentially giving you 60 days.