Warning: Do not risk being here on an overstay. If on departure you have an overstay, you will have to pay a penalty for every day of the overstay, except if the total overstay is only one day. But worse than that, if the police obtain you somewhere else than at the airport or the border without a valid visa they may put you in prison and you might have a lot of problems. So always contact the nearest immigration office if you do not want to leave the country in time or if you cannot leave for serious reasons, i.e. health reasons. An extension for 7 days is normally never a problem.
Another option is a so-called "Visa Run", i.e. to Cambodia. You exit the country, even for only some minutes, and on re-entering the country you are granted a 30-day visa. However, with this kind of visa, you are not allowed to stay more than 90 days in the country within a period of 180 days.
People age 50 years or older can easily apply for a retirement visa. They have to prove, that they have more than 800,000 Baht in a Thai bank account or they have to prove that their monthly income is more than around 70,000 Baht. Foreigners married to a Thai National get a 50 % "discount" on these amounts. The retirement visa allows you to stay in Thailand for one year without leaving the country. After that, it can be renewed. However, people staying more than 3 months in Thailand have to report at the immigration office every 90 days with a document, which clearly shows their current address.
There are also other types of visas available. Please contact the embassy or the Immigration office.
N.B. This visa information is only a guideline and the regulations may change.
Also always have a copy of your passport and a copy of the entry stamp/visa with you. A copy normally is accepted, so you can leave your passport in your hotel safe.
N.B. Working in Thailand without a work permit is strictly forbidden for foreigners.