Qualifying for U.S. lawful permanent residence (a green card) is a challenge. Many foreign-born people find they don't fit into any of the grounds of eligibility, or that if they do, they face a wait of many years before a visa becomes available to them. This is especially true in some of the family- or employment-based green card categories, where annual limits on the number of immigrant visas given out lead to waiting lists of years or, in rare cases, decades.
In such a situation, if your goal is to live in the U.S. soon, it might make sense to look into the possibility of getting a nonimmigrant (temporary) visa. That could allow you to stay legally for anywhere from a few months to several years. But you'll need to understand the pluses and minuses first.
Obtaining a nonimmigrant visa can help you get to know the United States, make sure you really want to live there, and develop connections that might lead to a green card; for example, connections with potential employers. Or if you happen to fall in love, you might qualify for a green card based on marriage to a U.S. citizen or permanent resident.
Some nonimmigrant visas, such as the F-1 student or employment-based ones, can actually allow you to live in the U.S. for many years. They might be renewable, or you might be able to switch from one status to another (such as F-1 student to H-1B worker).
A condition of obtaining many types of nonimmigrant visas for U.S. entry is that you intend to stay in the U.S. for a temporary period only, as opposed to using the visa as a pretext for getting into the U.S. and ultimately applying for a green card.
When you apply for your nonimmigrant visa, you will need to show the U.S. consular officer numerous documents proving your nonimmigrant intent.
More specifically, you will need to demonstrate that you are maintaining a residence abroad that you have no intention of abandoning, and that you have significant family- or employment-related ties to your country of origin, such that you will naturally want to return home when your U.S. visit is over. Such documents might include a letter from your employer and a copy of your home deed or apartment lease.
If you truly need or want a nonimmigrant visa so as to travel to the U.S. right away, but are definitely planning to apply for a green card later, you should probably not begin the process of applying for a green card (for example, by having a relative or employer file an I-130 or I-140 petition on your behalf) until you have less need to travel. Better to postpone applying for one until such time as you can wait for the green card to come through without too much inconvenience.
There are exceptions, however; in other words, visas for which you are allowed to have a "dual intent," as described next.
In certain nonimmigrant visa categories, it's okay for someone to apply for a green card without worrying about immigrant intent or their hope to stay in the U.S. permanently (and legally). In other words, the category allows for "dual intent," or a simultaneous promise that you will leave when you're expected to but will also apply for a green card.
By law, immigrant intent is not a factor for consideration in H-1A, H-1B, and L visa cases. Dual intent is also usually allowed in E, O, and P visa applications, but talk to an immigration attorney for the details if you're interested in one of these visas and also hoping to apply for a U.S. green card.
People who have already applied for green cards but are still waiting for an immigrant visa to become available sometimes have particular trouble obtaining nonimmigrant visas.
The U.S. consular officer who reviews their visa application tends to suspect that the applicant is merely looking for a way to hurry up the process by getting into the U.S. in order to apply for a green card there. This issue can be overcome, but be prepared with a good explanation for your visa request, and plenty of documentation showing why you really just want to visit the U.S. for a short time.