Foreigners are not allowed to own land in their name. If they want to purchase land they have to do so in the name of a Thai Limited Company which they have to form with the help of a law firm.
Another option is to lease land. The leasing time is usually 30 years and can be renewed for an extra 30 years. The leasehold can be transferred or sold like any other property. Even though the land is only leased, the foreigner can own the house or structure build on the land. He just has to apply for a construction permit to build the house in his own name.
If the foreigner is married to a Thai he can buy land in the name of the Thai spouse. The foreigner doesn’t have any rights over the land and if asked has to confirm that the funds used to purchase said property belonged solely to the Thai spouse. In the case of a divorce the non-Thai spouse has to prove that the land is marital property, which can be quite difficult. It is therefore recommended to set up a prenuptial agreement to minimize the risks for the non-Thai spouse.