It is part of immigration rules that you do it if you are in country 90 consecutive days on the DTV. You can do it in person or by post. What you need to present depends on which office ie in Chiang Mai you need your passport and completed TM47 form.
There are forms for this at Immigration Office. No idea the number. Some immigration office have a special desk or window for this. They do at Chiang Mai
Plenty have left and returned same day. Some at land crossings just as long it took to leave Thailand. Enter another country, leave and come back into Thailand.