A visa will only allow you to stay in Turkey for up to 90 days. To extend your stay beyond this period, you should apply for a long-term permit within 30 days after your date of arrival. Here is a walkthrough to the procedure.
The residence permit (ikamet) is the default long-term stay permit, applicable to any expat who does not (yet) have an employment contract. It concerns students, interns, retirees, but you can also claim it without having to elaborate on your reasons for staying in Turkey.
Your first residence permit can be issued for 1 year at most, provided your passport does not expire earlier.
To apply, simply file an online application on the immigration services website. You will be assigned an appointment (randevu) at the immigration office, whereby you will be required to submit an application file including a proof of residence (like a rental contract or a written invitation from a Turkish resident), a proof of health insurance coverage, a bank slip demonstrating your ability to support yourself financially throughout your stay (as of 2017, USD 500 per month of stay are required), and a receipt of payment for the registration fees (which can be performed at any tax office).
Good to know:
Assuming you subscribe to a minimum-coverage local health insurance policy, the total cost of your residence permit should not exceed 1,200 Turkish liras.
Online application for a residence permit
Provided you have an employment contract, a work permit will substitute for a residence permit.
Obtaining a work permit is slightly different, as the application must originate from your Turkish employer. Still, you will here again be invited to present yourself at an appointment, with a file comprised of the same supporting documents as for a residence permit, plus your employment contract, a certified translation of your diplomas, and either a work visa or a residence permit with a remaining validity of at least 6 months.
A work visa will have been obtained from a Turkish embassy or consulate in your home country in case you found your job from abroad (for more information, see our visas for Turkey article). If you find a position after entering Turkey under a tourist or student visa, you will be required to get a residence permit before converting it into a work permit.
The termination of your work contract results in that of your work permit, and hence puts an end to your authorization to stay in the country. It is, however, possible to apply straight away for another permit ' a residence permit, or another work permit if you find another job.
An application for extension should be filed a minimum of 1 month before the expiration date of your permit.
The required documents for renewal are the same as for an initial application, but unless your personal situation has changed since your previous application you will not be required to attend a face-to-face appointment, you can simply mail your documents.
Permit extensions can be issued for up to 2 years. After 8 back-to-back years of residence or employment in Turkey, you may apply for a permanent residence or work permit.
Good to know:
The Turkish immigration services have set up a hotline (157 from a Turkish line) whereby operators speaking half a dozen foreign languages are available to answer any question you may have about the residence and work permits.