If you are travelling to Thailand and you don’t meet all the conditions required for the visa exemption, you are best advised to contact the nearest Thai embassy/consulate in your home country and apply for a visa before you travel.
There are different types of visa depending on the reason for your travel. The majority of overseas visitors visit Thailand as tourists and so here I will outline what happens with the Tourist Visa (marked as ‘TR’ in your passport).
With this visa, when you pass through Thai immigration you will be granted a 60-day stay. Your passport will be stamped with the date you arrived and the date you are admitted to stay until. This visa may normally be extended (up to 15 or 30 days usually) by visiting the nearest Thai immigration office in Thailand and paying the extension fee (currently 1900 Baht). Make sure you apply for any extension before the original 60 days are up and take into account any days when the immigration office may be closed for public holidays.
Please be aware that there is no guarantee that you will be granted an extension; it is at the sole discretion of the Thai immigration officer that you see. Common sense should tell you to dress and act respectfully when visiting the immigration office.
The single-entry Tourist Visa must be utilized within 3 months from the date of issue. After this time it becomes invalid. For example, you send off your visa application to the embassy/consulate in your home country on March 1st. That application may be processed on March 5th and your passport returned to you a few days later with the visa dated accordingly as March 5th. That means that you must enter Thailand before June 5th (i.e. within 3 months). Therefore, don’t apply too far in advance for this visa. If in doubt contact your nearest Thai embassy/consulate for more details.