Holiday visitors arriving in Thailand can obtain a free 30 day visa on arrival. If you are planning to stay for more than one month then contact your local Thai Consulate or Embassy. They will normally issue a 2 month visitors visa on application but if you wish to stay longer you will need supporting documentation when you apply. A much visited and informative website with a comprehensive guide to the Thai Immigration regulations is thaivisa.com.
The nearest immigration office to Koh Chang is located at nearby Laem Ngop on the mainland. It is located about 1km outside Laem Ngop on the left side of the main road heading towards Trat. It's a brand new office and the service there usually reflects the new "Friendly and Helpful" attitude being adopted by the department nationally. If you ask in the office about services on Koh Chang they will show you "The Plan" to open an office on the island. They have photographs of the ceremony to dedicate the site but not much more than that. The office closes for lunch for some services but remains open all day for others.
Here you can deal with visa extensions and other queries. If you have a 30 Day Visa for Thailand you can extend this for up to 10 days. You can also get a one month extension on a two month visa. These extensions both cost 1,900 Baht. The office number is 039 597 261. They are closed on all National Holidays and at weekends so if you are in doubt and have a date to meet, bear that in mind and call ahead.
It is not advisable to overstay your holiday visa in Thailand. The charge for an overstay is 500B per day but If you overstay by only one day you won't be charged. Probably.
Many people stay in Thailand for long periods by "running" to the border every month and coming back the same day with a new 30 day visa. All that stopped effective October 1st 2006. Now you can only enter Thailand 3 times on a 30 day visa in any 90 day period. After that you cannot re-enter on a 30 day visa for a period of 90 days.