First, the USCIS must approve an immigrant visa petition, I-130 Petition for Alien Relative for you. This petition is filed by your relative (sponsor) and must be accompanied by proof of your relationship to the requesting relative.
Second, the Department of State must determine if an immigrant visa number is immediately available to you, the foreign national, even if you are already in the United States. When an immigrant visa number becomes immediately available to you, it means that you can apply to have one of the immigrant visa numbers assigned to you. You can check the status of a visa number in the Department of State’s Visa Bulletin.
Third, if you are already in the United States, you may apply to change your status to that of a lawful permanent resident after a visa number becomes available for you. This is one way you can apply to secure an immigrant visa number. Click here for application procedures for becoming a lawful permanent resident while in the United States. If you are outside the United States when an immigrant visa number becomes available for you, you must then go to the U.S. consulate servicing the area in which you reside to complete your processing. This is the other way in which you can apply to secure an immigrant visa number.