The same way anyone else immigrates to the US. They apply for a visa that allows them to enter the US. From there, they can apply for any of a bunch of different visas that allow them more time, the right to work, etc. These visas are researched and issued after consideration. Some of the items considered are:
- Are there already legal family in the US?
- Does this person bring a skill that is rare and desirable to the US?
- The person's legal and health histories are considered.
- Has this person been accepted into an accredited educational institution?
Because the US shares a very long border with Mexico, there is also some illegal immigration. As the immigrating Mexicans, legal and otherwise, easily become a part of the California, Arizona and Texas economies, it's not too uncommon for these states to assist in aquiring visas or immigration status -- amnesty -- for unregistered immigrants.