One of the ways a person can end up getting a U.S. green card is through the diversity lottery. This lottery is part of the Diversity Immigrant Visa Program. Under this program, up to 50,000 immigrant visas (visas connected to the permanent residency process) a year are issued to randomly selected diversity lottery entrants.
As a note, entry into the diversity lottery is not open to natives of every country. Rather, lottery eligibility is limited to natives of countries that have historically low U.S. immigration rates. Given that U.S. immigration rates for a given country can change over time, what countries are and are not on the list of countries whose natives may qualify to enter the diversity lottery can shift over time.
Also, there are limits to how many natives from one country can receive an immigrant visa through the diversity lottery in a given year. Specifically, in any given year, no more than seven percent of the overall diversity visas issued can go to a single country's natives.
So, one of the things that could disqualify a person from having the possibility of "winning" a diversity visa is if they come from certain countries. There are other possible disqualifiers, as there are additional eligibility requirements beyond just coming from certain countries for being able to receive a diversity visa.
Now, if a person is not eligible for the diversity lottery, this does not mean they have no chances of getting a green card. The Diversity Immigrant Visa Program is just one of many possible paths to a green card. Depending on their circumstances, a foreign national may qualify for one of the other paths. Individuals with questions about whether there are any paths to U.S. permanent residency they may qualify for may want to go to a skilled immigration attorney with their questions.
Sources: U.S. Citizenship and Immigration Services, "Green Card Through the Diversity Immigrant Visa Program," Accessed July 26, 2016
U.S. Department of State, "U.S. Visas -The Diversity Visa Process -Entry," Accessed July 26, 2016