Visas are obtained at a Thailand Embassy or Consulate. You do not normally get Visas inside Thailand. I think you could be speaking of an O-A long stay visa. The O-A must be applied for in your home country. Check the website of the Thailand Embassy in your home country. The O-A is a one year visa with multi-entry in the first year and is extendable for another year near automatically by exiting and reentering Thailand just days before the first year expiry. Generally the requirements are being age 50, have an equivalent of 800,000 baht in a bank in your home country, a police records check and a short medical certificate from a doctor.