Nationals of the following countries may enter Thailand by air without a visa for a visit of up to 30 days, crossing into Thailand by land may only get you a visa valid for 15 days.
Australia, Austria, Bahrain, Belgium, Brazil(90 days), Brunei, Canada, Chile(90 days), Czech, Denmark, Finland, France, Germany, Greece, Hong Kong, Hungary, Iceland, Indonesia, Ireland, Israel, Italy, Japan, Kuwait, Laos, Liechtenstein, Luxembourg, Macau, Malaysia, Netherlands, New Zealand, Norway, Oman, Peru(90 days), Philippines, Poland, Portugal, Qatar, Singapore, Slovakia, Slovenia, South Africa, South Korea(90 days), Spain, Sweden, Switzerland, Turkey, United Arab Emirates, United Kingdom, United States of America and Vietnam.
Nationals from the following countries can obtain a visa on arrival and stay for up to 15 days.
Andorra, Bhutan, Bulgaria, China, Cyprus, Estonia, Ethiopia, India, Kazakhstan, Latvia, Lithuania, Maldives, Malta, Mauritius, Oman, Romania, Russian Federation, Saudi Arabia, San Marino, Taiwan, Ukraine and Uzbekistan.
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.
You cannot stay for than 90 days in a 180 day period if you entered on a "visa exemption" program, this does not apply to days entered on a visa obtained from an embassy or consulate.
Visa to Thailand
Official site for Visa requirements
Thailand Embassies and Consulates
Foreign Embassies and Consulates in Thailand
Or if you want a longer story, please visit www.thaivisa.com