The United States has had mandatory military service for men during wartimes. During the unpopular War in Vietnam where were many anti-draft protests, including burnings of draft cards. The most recent draft ended in 1971. Since that time the US has relied on all-volunterer armed forces.
However, all US males between the ages of 18 and 25 are supposed to be registered with the Selective Service System, which administers military conscription for the purpose of having information available about potential soldiers in the event of war.
The Selective Service Act of 1917 was passed by Congress giving the President the power to draft men for military service. The Selective Training and Service Act of 1940 was the first peacetime conscription in United States history. The original Act was allowed to expire in 1947 because it was thought that a sufficient number of volunteers would enlist for the nation's defense. The number of volunteers was not enough, however, and a new draft act was passed in 1948. Between 1948 and 1967 several draft laws were enacted.
In 1975 President Gerald Ford signed Proclamation 4360, Terminating Registration Procedures Under Military Selective Service Act, eliminating the registration requirement for all 18-25 year old male citizens.
Then in 1980 President Jimmy Carter signed Proclamation 4771, Registration Under the Military Selective Service Act, retroactively re-establishing the Selective Service registration requirement for all 18-26 year old male citizens born on or after January 1, 1960. Only men born between March 29, 1957, and December 31, 1959, were completely exempt from Selective Service registration.
If the agency were to mobilize and conduct a draft, a lottery would be held in full view of the public. This would be covered by the media. First, all days of the year are placed into a capsule at random. Second, the numbers 1-365 (1-366 for lotteries held with respect to a leap year) are placed into a second capsule. These two capsules are certified for procedure, sealed in a drum, and stored.
In the event of a draft, the drums are taken out of storage and inspected to make sure they have not been tampered with. The lottery then takes place, and each date is paired with a number at random. For example, if January 16 is picked from the "date" capsule and the number 59 picked from the "number" capsule, all men of age 20 born on January 16 will be the 59th group to receive induction notices. This process continues until all dates are matched with a number.
Should all dates be used, the Selective Service will then conscript men at the age of 21, then 22, 23, 24, and 25. Men ages 18 and 19 are not likely to be inducted to the system. Once all dates are paired, the dates will be sent to Selective Service System's Data Management Center.
The issue of women being exempted was addressed and approved in 1981 by the United States Supreme Court in Rostker v. Goldberg, with the Court holding "The existence of the combat restrictions clearly indicates the basis for Congress' decision to exempt women from registration. The purpose of registration was to prepare for a draft of combat troops. Since women are excluded from combat, Congress concluded that they would not be needed in the event of a draft, and therefore decided not to register them." (info from Wikipedia)