
Each year, the Diversity Visa program allows 50,000 randomly selected people—only from countries that don’t send many immigrants to the United States—to obtain permanent residency (commonly called a “green card”). It’s a way for individuals and families who otherwise wouldn’t have any way to legally immigrate to the United States to get a green card.
Entering the Diversity Visa lottery (aka green card lottery) involves filling out a simple form online, and it doesn’t cost anything. You can enter the lottery every year from early October through early November. The winners are selected at random by a computer, and they and their immediate families receive green cards.
source