People of any nationality can apply for a one-year non-immigrant education visa (ED visa). The student visa can then be renewed up until you have finished your studies in Thailand.
You can apply for a one-year visa at any Thai embassy or consulate. People from Bangladesh, China, India, Iran, Sri-Lanka and Middle Eastern countries, however, have to apply for a student visa in their country of residence.
To apply for a Thai student visa, you will need the following:
The Letter of Admission from your school must be printed with the school's letterhead and must show the exact start date of the course and the classes you are signed up for. An e-mail from the school saying you have been accepted is not sufficient.
If possible, apply for your student visa before going to Thailand. Immigration rules change very fast in Thailand and if you arrive in Thailand without any visa, bear in mind that you will have to leave the country in order to apply for a non-immigrant ED visa.
A student visa is only valid for 90 days when you first receive it. Within this 90 day period, you need to register and pay your tuition fees for the respective semester. With a letter confirming your registration, you can then apply for a visa extension to cover the full study period.