You must have permission from USCIS to be employed.
Working without USCIS permission is illegal/unauthorized employment.
In some cases, permission is included with visa status. For example, F-1 students can work on their campus for up to 20 hours a week without applying for permission.
In other cases, you must apply for permission. Optional Practical Training requires applications for permission.
Please follow all rules and guidelines included with your visa status/authorizations for employment. For example, working a few days after your OPT end date is illegal and will put you out of status.
If you do not have authorizations/permissions, all work is illegal. This includes work that is paid for in cash.