Nationals of the following countries may enter Thailand without a visa for a visit of up to 30 days.
Australia, Austria, Bahrain, Belgium, Brazil, Brunei, Canada, Denmark, Finland, France, Germany, Greece, Hong Kong, Iceland, Indonesia, Ireland, Israel, Italy, Japan, Kuwait, Laos, Luxembourg, Macau, Malaysia, Netherlands, New Zealand, Norway, Oman, Peru, Philippines, Portugal, Qatar, Singapore, South Africa, South Korea, Spain, Sweden, Switzerland, Turkey, United Arab Emirates, United Kingdom, United States of America, Vietnam.
Nationals from Brazil, Chile and Peru can enter for up to 90 days.
Nationals from the following countries can obtain a visa on arrival and stay for up to 15 days. Bhutan, China, Cyprus, Czech, Estonia, Hungary, India, Kazakhstan, Latvia, Liechtenstein, Lithuania, Maldives, Mauritius, Oman, Poland, Russian, Federation, Saudi Arabia, Slovakia, Slovenia Ukraine.
If you are only eligible for a 30 day visa, you can apply and get a 60 day visa in advance at an embassy or consualte.
If you overstay your visa you are looking at 500Bht per day at the border/airport. If you get caught by the police anywhere else you are looking at MINIMUM a few days in a Thai prison. Overstaying (even by one day) may result in prison, trial and deportation. To get an extention on your visa, you may want to go across the border and come back.
Thailand has recently tightened up its visa requirements so you cannot stay for than 90 days in a 180 day period. So don't be surprised if you are doing a "visa run" when you are not allowed to re-enter Thailand.