The first draft imposed since the Civil War, the Selective Service Act of 1917, passed by overwhelming majorities in Congress, was signed by President Wilson a century ago. The Act provided for the enlistment, at the discretion of the President, of the four volunteer divisions that Theodore Roosevelt planned to lead. Go here to read about this provision. Wilson, alarmed that Roosevelt would either be killed in France and he would be blamed, or that he would come back a national hero and be swept into the Presidency in 1920, would refuse to ever authorize the four volunteer divisions. By the end of the War some 2 million Americans volunteered for service and some 2.8 million were drafted.
Individuals who belonged to religions or organizations opposed to War were exempted from combatant service but not from noncombatant service. Members of the clergy were exempted from conscription as were seminarians.
The draft had various other exemptions, including for men who were the sole support of families where the family income would be insufficient if the sole breadwinner was drafted.
World War I was a popular War and there was little resistance to the draft. There were legal challenges to it, and the US Supreme Court upheld the constitutionality of the Selective Service Act. The unanimous opinion of the Court was authored by Chief Justice Edward Douglass White, Jr., who had served in the Confederate Army during the Civil War:
As the mind cannot conceive an army without the men to compose it, on the face of the Constitution, the objection that it does not give power to provide for such men would seem to be too frivolous for further notice. It is said, however, that since, under the Constitution as originally framed, state citizenship was primary, and United States citizenship but derivative and dependent thereon, therefore the power conferred upon Congress to raise armies was only coterminous with United States citizenship, and could not be exerted so as to cause that citizenship to lose its dependent character and dominate state citizenship. But the proposition simply denies to Congress the power to raise armies which the Constitution gives. That power, by the very terms of the Constitution being delegated, is supreme. Article VI.