I said any Immigration office. They’re all over the country. Go to the nearest one. Some require you to be on your last week. Others will let you extend sooner.
You need to hang onto your boarding pass when you arrive by air. You don’t need a boarding pass when you enter by land. You are allowed 2 entries by land or sea in a calendar year.
Each time you enter Thailand, you will receive a visa-exempt stamp in your passport good for 30 days. All you need is your passport and your boarding pass from the flight to Thailand.
The Thai government has made it the responsibility of each airline serving Thailand to check for an onward ticket within the Visa-on-Arrival or visa-exempt period or deny boarding. Some airline clerks check for this and some don't. A strategy that many people employ is to check-in with the airline a bit early. If the airline clerk asks for an onward ticket, get out of line and "rent" a ticket from a site like onwardticket. com (they cost around $15US) or purchase a real refundable ticket out of Thailand online. Then, get back in line and check-in. If you bought the refundable ticket, cancel it after you check-in.
The Thai Embassy in your country has the list of protected jobs. Work permits, for the approved occupations, are issued to the employer, not the employee. So, you first have to find a company that will apply for a work permit for you. Thailand is a very hard country to work in.