The U.S. government offers refuge to people who fear, or who have experienced, persecution in their home country. A person still outside the U.S. would apply to be a refugee; a person already at the U.S. border or (better yet) inside the U.S. would apply for asylum.
If you are fleeing only poverty or random violence, you do not qualify in either category. Various bars, such as a criminal background, also block asylum eligibility.
One year after having been granted asylum or refugee status, you can submit an application to adjust status (get a green card). Refugees are, in fact, required by law to wait no longer than one year after receiving their status and having been physically present in the U.S. to apply for the green card. Asylees can wait to apply for as long as they want, though earlier is better—your asylee status can be taken away if conditions if your home country change and the U.S. government decides it's safe for you to return there.
The law allows certain people who have lived unlawfully (commonly called illegally) in the U.S. for more than ten years to request permanent residence as a defense in immigration court proceedings. This remedy is called "cancellation of removal," though many people refer to it as the "ten-year green card."
You must also show that your spouse, parent, or children—who must be U.S. citizens or permanent residents—would face "exceptional and extremely unusual hardship" if you were forced to leave. Consult a lawyer if you think you qualify. Do not go straight to USCIS, which could result in your deportation (removal).
Another remedy called "registry" allows people who have lived in the U.S. continuously since January 1, 1972 to apply for a green card. You'll need to show that you have good moral character and are not inadmissible. Your stay in the United States need not have been illegal—time spent on a visa counts.
Individual members of the U.S. Congress have, on occasion, intervened for humanitarian reasons in extraordinary cases, helping someone get permanent residence even if the law would not allow it.
For further information to help you understand whether you're eligible for a green card, and then make it through the bureaucratic maze, see How to Get a Green Card, by Ilona Bray and Loida Nicolas Lewis, or U.S. Immigration Made Easy, by Ilona Bray (both from Nolo).
1 | 2