When your tourist visa is about to expire, you do have to leave Thailand and get a new tourist visa in a nearby country. This is called a "Border Run". We recommend people fly to another country instead of doing the land border runs.
Border runs are not a substitute for making arrangements for a long term visa and generally after a couple of border runs, its best to make a plan on how to stay in Thailand with some kind of extended visa.
Visit our website to see what kinds of visas are available