There are three categories of migrants who have the right to get a completely legal job in the United States
Temporary employees. Migrants who come to the country on a work visa. Often, already at the stage of paperwork, they have already concluded a contract with a specific employer, who sends them a call to work. They have the right to live and work in the United States as long as the visa is valid. However, they cannot arbitrarily change their line of work. Changing employers is also not a very simple process for them.
Permanent employees. Migrants who have received a green card and have the right to permanent residence in the United States. In order to work legally, they do not need a special permit. They enjoy the same labor rights as US citizens.
Students who have a student visa. They have the right to official employment, but only upon receiving a work permit from the administration of their educational institution. Such a permit is issued if the work will not interfere with the student’s academic success.
Working on a guest or tourist visa is prohibited. If this point of the law is violated, the non-resident may be deported from the country with a subsequent lifelong ban on entry.