Selective Service is an independent branch of the United States government that retains information on all U.S. males who qualify for potential military conscription. All males between ages 18 & 25 who are either U.S. citizens or non-citizen immigrants must register within 30 days of their 18th birthday. However, registration with Selective Service is not the same as signing up with the U.S. Armed Services, since Selective Service is not a part of the Department of Defense.
A non-citizen immigrant is one who possesses an immigrant visa with an intent to remain in the United States. Non-citizen immigrants include parolees, undocumented immigrants, legal permanent residents, asylum seekers, and refugees. As a result, non-citizen immigrants between 18 & 25 years or age who attain an immigrant visa must register with Selective Service within 30 days of arriving in the United States. Dual nationals are mandated to register with Selective Service because they are, by definition, also U.S. immigrants.
There are allowed exceptions, such as conscientious objectors, medical disabilities, and active military/National Guard/Reserve. Non-immigrants are not required to register, i.e. B-2, H-1B, F-1 visas.