If you need to extend your stay beyond the visa exemption, here's how visa runs work in practice.
Crossing out of Thailand briefly to a neighbouring country (Poipet in Cambodia, Aranyaprathet, Mae Sai in Myanmar) and re-entering to get a new entry stamp.
Thailand limits consecutive border runs — multiple re-entries may be questioned; official policy is somewhat grey; officers have discretion to refuse re-entry.
Applying for a TR (Tourist Visa) at a Thai embassy before arrival gives 60 days extendable by 30 days at an immigration office; much more reliable than border runs.
Any immigration office in Thailand can extend a tourist visa stamp by 30 days for 1,900 THB — a better option than leaving the country.
Non-Immigrant B (business), O-A (retirement), O (family), or the LTR (Long-Term Resident) visa are the correct paths for extended stays — not indefinite border runs.