Before you become a resident of Turkey, you will need a vergi numarası (tax number), to do things such as opening a bank account. You can get your tax number with your passport.
After you become a resident of Turkey, you will have a residence permit, which is an ID card, bearing your yabancı kimlik numarası (foreigner identification number, or YKN). You can then use your foreigner identity number instead of your tax number. You will especially need this number to set up your residential telephone and internet services.
If you are applying for your residence permit, and need your kimlik numarası before you have your actual residence permit card, you can get one from the Göç İdaresi Genel Müdürlüğü (Directorate General of Migration Management, or DGMM) which services the area where you live.
Turkey's Foreigner Communications Center
The DGMM has a number you can call to speak to an immigration specialist. Call 157 from any telephone within Turkey. The call will be free. From outside of Turkey, call +90 312 157 1122. Long-distance charges will apply.
Turkey Residence Permits Forum: Our forum for all things having to do with getting a residence permit in Turkey. If you have questions, that is the place to ask them.
Turkey Residence Permit Law (PDF): The Law on Foreigners and International Protection, Dated April, 2014. In English, this is the Turkish law which governs residence permits.