You must apply for the permanent residence permit in writing at the Immigration Office responsible for you. You can search for the responsible Immigration Office at bamf.de. You will find the necessary form, i.e. "Application for the Permanent Residence Permit" ("Antrag auf Erteilung der Niederlassungserlaubnis") on the website of the Immigration Office. You have to send the filled application form, a biometric passport photo and the following documents to the responsible Immigration Office per post:
a copy of your passport
a copy of your employment contract, your last six payslips, and a recent confirmation letter from your employer which verifies that you are still employed there. This confirmation must not be older than 14 days. If you are self-employed: your last tax assessment and an audit report completed by a tax consultant.
a recent document from your health insurance company verifying that you are insured.
a copy of your rental agreement
a copy of your German language certificates
your pension information (from the German pension insurance scheme)
if you receive child benefit, parental allowance or alike: the relevant confirmation letters
the confirmation of your registration with the police
If you belong to a group entitled to easier requirements, you will have to submit fewer documents. You can find out the list of needed documents on the application.
Keep in mind that you have to pay in order to obtain a permanent residence permit.
As soon as the Immigration Office has checked your application, they will notify you in writing.