As a foreigner, you can stay in Turkey for a maximum of 90 days within 180 days. This applies to both tourists and business visitors. If you want to visit Turkey for a more extended period, you will need to apply for a residence permit.

To apply for a residence permit, you will need to visit a local immigration office and provide the necessary documents, such as a valid passport, a completed application form, and proof of sufficient financial means to support yourself while in Turkey. 

You may also need to provide evidence of a valid reason for your stays, such as employment, study, or family reunification. The length of your residence permit will depend on the purpose of your visit and other factors.

It's important to note that the rules for entry and residence in Turkey are subject to change, so it's always a good idea to check the latest information before travelling. You can find more information on the Turkish Ministry of Interior website.