Here is my experience. First you need to check the Royal Thai Embassy site. The Thai government approved 55 countries to enter visa free or visa on arrival visa. So look for where your country's passport is listed in the Thai government requirements. If your country is not in that visa exempt program, you have to get the visa to go there. Check the countries here.
You should apply for a visa at least 1-2 months in advance. If you can't get a fast visa from where you live, you can get it in one day at the Yangon, Myanmar Thai Embassy or the Thai Embassy in Laos.
Different nationalities have different requirements; it depends on what country's passport or citizenship you have.
Also remember that green card or a refugee travel document are not accepted as a travel document, only your passport.