If you are living in the U.S. as an immigrant, then you may need to get a job. When you apply, you will notice questions specifically addressing your immigration and work status. These are two separate distinctions. You may be here legally, but that does not automatically grant you the right to work in every case.
According to the U.S. Citizenship and Immigration Services, there are several options you have to gain the right to legally work in the country. Employers must follow the law when hiring immigrants, and they can only hire those who have the legal right to work, which means until you secure this right, you will not be able to secure employment.
Basic work authorization
If you are a lawful nonimmigrant, you can apply for a change in status to get employment authorization or become a lawful permanent resident. Once you are a lawful nonimmigrant, you will have the right to work legally.
For students or exchange visitors, there are some limited circumstances in which you may be able to request authorization to work. Green card holders automatically have the ability to secure employment.
You may be able to obtain work authorization if you are undocumented as well. You will need to contact the USCIS to get the appropriate forms.
Through an employer
If you are living outside the country and want to enter the country with the specific purpose to work, then you need employer sponsorship in most cases. Your employer files a petition for you that allows you to work here on a temporary basis.
You may also be able to get an employment-based visa. This is due to skills you have or because you have education or experience in a specific category. Alternatively, if you do not wish to stay in the U.S. and you only need to come into the country for a short business trip, then you will need a B-1 visa.
Note that even if you obtain the employer sponsorship or have your visa to work, you must still pass the U.S. Customs and Border Protection review at the border for entry into the country. This is a separate process from getting the correct visa. Also, the conditions of every visa may vary with different requirements you must meet and how long you may work.