This will depend on where you are from.  For details of Thailand’s visa arrangements with specific countries see here. Although tourist visas are generally required, there is an exemption for travelers from 30 countries (Australia, UK, USA, France, Germany, Sweden and others) who wish to travel to Thailand for 30 days or less.  If you are a citizen of one of these countries you do not need to obtain a visa.  Note that if you plan to stay for longer than 30 days, it is possible to obtain a short extension from the immigration office on Koh Samui at some point during your stay. If you are not a citizen of one of the countries with which Thailand has specific visa exemption or waiver arrangements, you will need to obtain a 30, 60 or 90 day tourist visa before arriving in Thailand