The rules here are somewhat peculiar. If you are married to a Thai and/or responsible for a Thai child then you are permitted to stay in Thailand on a year by year basis (plus confirm your address every 90 days). For this permission you are required to have either an external income or monies in the bank amounting to c. US$ 13,000.00. If you are retired (50 years old or over) you are permitted to stay (but not work - not even voluntarily) on condition that you have an income of or monies in the bank of c. US$ 26,000.00. (the confirmation of address every 90 days also). There are also business, student and working "visas" and probably others of which I am unaware.
Also, as "aliens" we are required to report any overnight stay at other than our registered address within 24 hours, and thereafter report your return to your registered address if relevant. The owner of the establishment or house where you stay also has to register that an "alien" is residing there.
Luckily the beer and diesel are cheap.