A permanent resident means they have the right to work in the country for most employers or for themselves. Permanent residents continue to have citizenship in another country.
A lawful permanent resident is granted the right to live in the United States permanently. Permanent residents are given a green card, which is a photo ID card to proves their status.
Many foreign students come and work holding an H1B holder, this does not mean that they have lawful US permanent residence, so according to the USCIS, they are not resident aliens.
For tax purposes, an individual is classified as a resident alien if they either have the green card or the substantial presence test for the calendar year.
An individual needs to either have a current green card or have had one in the previous calendar year for the green card test.
For the substantial presence test, during the current year that person should have been in the U.S. for more than 31 days and during a three-year period for a duration of 183 days including the current year and the two years prior.