There are different Thai visas and each Thai visa has it own procedure to extend its validity, This is a very brief overview of what is needed to have each one extended and what the documents that you will be required to have.
Can a Visa on Arrival (VOA) be extended?
That is a very common question and the answer is both yes and no. The VOA cannot be extended in general. Should you however not be able to travel, the VOA may be extended by Thai Immigration. The grounds are normally on the bases of medical grounds. As an example, you suffer a heart attack during the course of your stay in Thailand, Thai Immigration will extended the VOA until such time that you are able to travel again. Applications to have the VOA extended has to be done at Thai immigration : Sub-division 2, Immigration Division 1, Room 205, 2nd Floor of the Front Building, Immigration Bureau, Soi Suan Plu, South Sathorn Road, Sathorn District, Bangkok.
NB: The Visa on arrival will only be extended for medical reasons.