If you are a U.S. citizen with a non-U.S. citizen girlfriend, she may have trouble obtaining a U.S. visa (or remaining in the United States if she has already entered) unless she has immediate relatives in the United States. There are two ways, however, to assist your girlfriend in obtaining U.S. immigration benefits--get engaged to her or marry her.
If your girlfriend is currently abroad, you may apply for a fiancee visa on her behalf by filing USCIS Form I-129. In order to qualify for this visa, you must be engaged to her, you must intend to marry her within 90 days of her entering the United States, and the relationship must not have been entered into for the sole purpose of securing her entry to the United States. If she does not marry you within 90 days of entering the United States, she will have to leave the United States. If she marries someone else while in the United States on a fiancee visa, she will have to leave the United States and wait for a second fiancee visa to be approved before she can re-enter the United States.
Adjustment of Status
If you marry your girlfriend while in she is in the United States on a fiancee visa, you will be able to file a petition for permanent residence (a "green card") on her behalf. Under most circumstances, you may file this petition even if she is in the United States illegally. Applying for permanent residence is accomplished by filing USCIS form I-130 and providing a considerable amount of documentation (marriage certificate, birth certificate, medical examination, police certificates and other documents). She cannot file this application herself. She will have to file USCIS Form I-485 for adjustment of her status to permanent resident. She will have to prove that she is capable of supporting herself financially while in the United States. If she cannot show sufficient resources, she will have to find a sponsor. You can sponsor her if you have sufficient resources; otherwise she will have to find another sponsor. She will be able to remain in the United States, while waiting for her permanent residence to be approved and will be able to apply for a work permit.
If the Fiancee Visa Application is Denied
If your girlfriend is not in the United States and her fiancee visa application is denied, you can marry her overseas and petition for permanent residence on her behalf. You will have to file Form I-130 on her behalf, and she will have to provide the same documentation that is required to file for adjustment of status inside the United States. Once your petition is approved, she will need to go to a U.S. Embassy or consulate in her home country to have an immigration visa stamped into her passport. After she enters the United States, her permanent residence card will be mailed to her within a few weeks. She will probably have to wait outside the United States for about a year while your petition is being processed.