From USCIS website:
Availability of Immigrant Visas
The Immigration and Nationality Act (INA) sets the number of immigrant visas that may be issued to foreign nationals seeking to become lawful permanent residents (get a Green Card) each year.
Immigrant visas for “immediate relatives” of U.S. citizens are unlimited, so they are always available. Immediate relatives include:
The spouses of U.S. citizens,
The children (unmarried and under 21 years of age) of U.S. citizens,
The parents of U.S. citizens at least 21 years old, and
Widows or widowers of U.S. citizens if the U.S. citizen filed a petition before his or her death or if the widow(er) files a petition within 2 years of the citizen’s death.
Immigrant visas for the family-sponsored and employment-based immigrant preference categories are numerically limited, so they are not always immediately available. For more information, please see the Green Card Eligibility page.
The U.S. Department of State (DOS) is the agency that allocates immigrant visas. In general, family-sponsored preference visas are limited to 226,000 visas per year and employment-based preference visas are limited to 140,000 visas per year. (By statute, these annual visa limits may be exceeded when certain immigrant visas from the previous fiscal year’s allocation were not fully used.) Both categories are further divided into several sub-categories, each of which receives a certain percentage of the overall visa numbers as prescribed by law. In addition, there are limits to the percentage of visas that can be allotted based on an immigrant’s country of chargeability (usually the country of birth).
When the demand is higher than the supply of visas for a given year in any given category or country, a visa queue (waiting list or backlog) forms. To distribute the visas among all preference categories, DOS allocates the visas according to a prospective immigrant’s preference category, country of chargeability, and priority date. The priority date is used to determine an immigrant’s place in the visa queue. When the priority date becomes available, or is “current,” immigrants may be able to apply for adjustment of status and obtain lawful permanent resident status, if otherwise eligible.
Finding Your Priority Date
If you are a prospective immigrant, you can find your priority date on Form I-797, Notice of Action, for the petition filed on your behalf. The waiting time before receiving an immigrant visa or adjusting status depends on:
The demand for and supply of immigrant visas.
The per-country visa limitations.
The number of visas allocated for your preference category.
Priority Dates for Family-Sponsored Preference Cases
For family-sponsored immigrants, the priority date is the date that the Form I-130, Petition for Alien Relative, or in certain instances the Form I-360, Petition for Amerasian, Widow(er), or Special Immigrant, is properly filed with USCIS.
Priority Dates for Employment-Based Preference Cases
For employment-based immigrants, the priority date depends on the following:
If Then your priority date is the date:
Your preference category requires a labor certification from Department of Labor (DOL)
The labor certification application is accepted for processing by DOL.
To preserve the priority date, the petitioner must file Form I-140, Immigrant Petition for Alien Worker, with USCIS within 180 days of the DOL approval date on the labor certification or else the labor certification is no longer valid.
Your preference category does not require a DOL labor certification USCIS accepts Form I-140 for processing to classify the sponsored worker under the requested preference category.
You are a fourth preference special immigrant, including religious workers USCIS accepts Form I-360, Petition for Amerasian, Widow(er) or Special Immigrant, for processing.
You are a fifth preference investor USCIS accepts Form I-526, Immigrant Petition by Alien Entrepreneur, for processing.