Firstly you need to understand the difference between a Visa, only obtainable outside of Thailand and an Extension, only available inside
Thailand from your local Immigration office where you live.Both Extensions are for one year and both require a Re-entry permit if you want to leave Thailand and come back with an intact Extension.
The Retirement Extension takes one day to obtain (usually) and financial requirements of either 800,000 Baht in a Thai bank OR an Income of 65,000 Baht (certified by Affidavit from your Embassy here) OR a combination of both totaling over 800K per annum.
The Marriage Extension is more complicated in paperwork required, takes an "under consideration period" of 30 days and either 400K in a Thai bank OR Income of 40,000 Baht per month (NO combination method available).
Both Extensions have differing "money seasoning" requirements.
For both Extensions it is best to enter on some form of Non Immi O Visa - or obtain one from a nearby Consulate or Embassy (Laos, Penang etc)