One of the most common forms of immigration which creates a path to a "Green Card" occurs when a U.S. Citizen or Lawful Permanent Resident files a petition to sponsor his or her relative abroad (or sometimes from within the U.S.) and bring the relative to live permanently in the United States. The government sets limits on the numbers of visas that can be issued for certain family-based categories, which is why, depending on the sponsor's relationship to the relative and the country from where they are coming, wait times may vary as to when they would be eligible to apply for a visa to come to the United States.
U.S. Citizens who are over the age of 21 can petition to sponsor their foreign spouses, parents, and children (unmarried and under 21). These relatives are considered "immediate relatives" and are not subject to the visa quotas. As such, any wait time is limited to the amount of time it takes the government to process the applications.
Preference Categories are assigned to immigrant families based on the relationship to the sponsor and the sponsor's status in the United States.
The quotas are not only impacted by relationships and status, but also by the country of birth of the foreign relative. Unfortunately, there is no way to determine how long someone in a certain preference category must wait to apply for a visa; however, the Visa Bulletin, which is published monthly, indicates the cases the government is currently processing based on the "priority date," which reflects the date the relative petition was filed. When the "priority date" is current, the foreign relative can apply for an immigrant visa to come to the United States (or in other cases, apply immediately for a "Green Card" if the foreign relative is already in the United States in another status).
Although some people may be subject to exceptionally long waits (sometimes upwards of 15 years), petitioning for the relative places him or her in the line to eventually apply to emigrate to the United States.
A Quick Note on Marriage
For immigration purposes, a marriage is considered "legal" if the marriage was legal in the location where it took place and is not against public policy. This may hold true for certain religious marriages, proxy marriages, and same sex marriages.