There is no way can apply for permanent residency as a student in USA. Once you graduate in USA, you’ll have to find a job there. When you find a job, you’ll be staying in USA on a working visa for few years. After that, depending upon case and situation, you can apply for a green card. Green card is a permanent residency card for United States which allows you to stay in USA permanently for a life time.