A person who is not a US citizen or permanent resident must have permission from USCIS in order to be employed. Working without this permission is illegal or unauthorized employment.
Sometimes the permission comes with the visa status. For example, F-1 students can work on their campus for up to 20 hours a week without applying for any extra permission.
Sometimes, the person must apply for permission, such as a student applying for Optional Practical Training.
We advise students to be very careful of this. For example, it may not seem like an issue to work "only a couple of days" after your Curricular Practical Training ends. However, this is a problem, because it is illegal work.
Working without any work permission, including working for cash, is illegal employment.
Illegal employment puts you out of status. To return to a valid status, you must leave the US and enter in a new status. If you are an F-1 student, you would need to reenter to begin a new status. If you need to obtain a new visa and it is difficult to obtain visas in your country, you will have a big problem, and a big expense.
If you have a visa, you want to protect it. Do not work illegally!