It depends on your type/nationality of your passport.
Not every citizen around the globe can enter Thailand on a visa-free scheme, although many nationalities can benefit from bilateral agreements. This allows them to enter Thailand as tourists (non-immigrant visa) for a period of either 2 weeks, one month (30 days), or for a few nationals for up to 90-days visa free. If you need to stay in Thailand for a longer period of time, consider a Thai educational visa.
The list of visa exemption countries can be found on several websites. The following one contains lots of specific details with updated information about visa-free travel for relevant national passport holders: https://www.thaiembassy.com/thailand-visa/thai-visa-exemption-and-bilateral-agreement. Those that are not in the list have to obtain visa from their respective Thai embassy or consulate before they travel to the Kingdom.
Check the length of your visa-free stay.
From the about 64 nationalities that can enter Thailand as a tourist with the visa-free scheme, the periods of staying differ according to the passport. Entering by land or via airport, most passports with visa-free scheme (for tourist purposes) usually receive a permit to stay for 30 days. A few receive only 14 days stay. Another small selection receive up to 90 days stay. These lucky countries include South Korea, Brazil, Peru, Argentina, and Chile. See our post on which countries need a Thai visa for more details.
With covid border controls, some issues have to be updated.
Since March 2020 things have changed greatly around the word. Thailand visa requirements are no exception. There is currently a visa relief scheme, or automatic visa extension for foreigners who stay in Thailand and are affected by the pandemic crisis. This was set by the Thai government late in the first quarter of 2020 and can be applied to many types of visas until July 2020.
After this, there came some on-and-off travel bans for some regions of the world. Some nationals that used to enter Thailand with visa-free scheme now have to apply for a visa with other supporting documents (mostly related to negative covid tests and health insurance. Some of the most updated information including frequently asked questions can be found here.
Some nationals that are still granted visa-free as tourists still have to prepare for a covid test and a quarantine period too. For certainty, besides some useful and up-to-date relevant websites, foreign visitors can check with their nearest Thai embassy or consulate as well.