Visitors to Thailand must hold a passport valid for at least six months beyond the date of their arrival in the kingdom. Citizens of 58 countries, including all EU and ASEAN members as well as Australia, South Africa and the USA, do not need visas to enter the country: a 30-day ‘permission of stay’ is stamped in your passport when you pass through immigration at the airport. There is no charge for this, nor any paperwork, other than the landing card you will be given on the plane. Just join the normal queue at immigration and the officer will do it for you.
Note: if arriving in Thailand overland (e.g. across the Malaysian border), this free permission of stay is reduced to 15 days only (unless you are a citizen of Malaysia, in which case the full 30 days is granted).
Citizens of a further 21 countries can be granted a ‘Visa on Arrival’, with a 15 day validity. This is a paid service and can be issued at all international ports of entry (land, sea and air), including Krabi Airport (even though this is not specifically listed on the Ministry of Foreign Affairs website link, below), upon presentation of a return ticket, evidence of funds to support your stay, a passport photograph and a fee of 1000 baht (visit the link for current requirements).
The 21 ‘Visa on Arrival’ countries are: Andorra; Bhutan; Bulgaria; China; Cyprus; Ethiopia; Fiji; India; Kazakhstan; Latvia; Lithuania; Maldives; Malta; Mauritius; Papua New Guinea; Romania; San Marino; Saudi Arabia; Taiwan; Ukraine; Uzbekistan.
Visitors who do not qualify for either of these options, or who wish to stay in Thailand longer than 30 days, must apply for a visa at their local Royal Thai Embassy before departure. The standard tourist visa is a single entry, 60-day permit, which can be extended by one month while in Thailand, on payment of 1,900 baht.
For a full list of visa-exempt countries, see the Thai Ministry of Foreign Affairs website. You can also find further information about other types of visa and visas on arrival on this site.