After a brief period of federal control in the early 1800s, administration of the smallpox vaccine was mainly left to the states. Because of that, there is more than a century of different laws, mandates, and vaccination campaigns to sift through. To keep things simple, we can look at a few big court cases and outbreaks to get a general idea of what states did to eradicate smallpox through vaccination.
In short, smallpox vaccinations could be enforced among adults through fines for noncompliance, children were often required to be vaccinated to attend public school, and people were just generally encouraged or willing to get vaccinated to prevent or control outbreaks.
In 1813, Congress passed the Vaccine Act of 1813, which had half a sentence authorizing a federal agent to preserve the vaccine for any citizen who asked for it, and two paragraphs devoted to how that agent could use the postal system to distribute it:
...That the President of the United States be, and he is hereby authorized to appoint an agent to preserve the genuine vaccine matter, and to furnish the same to any citizen of the United States, whenever it may be applied for, through the medium of the post-office;
Unfortunately, it seems that in 1821 a doctor appointed as the federal agent caused an outbreak in North Carolina by accidentally sending a sample of smallpox rather than the vaccine, and the law was soon repealed.
For the rest of the 19th century, states implemented their own measures to control any smallpox outbreaks, including mandatory vaccinations in certain situations and different punishments for noncompliance. In 1905, Jacobson v. Massachusetts established that compulsory vaccine laws were constitutional, and the text of the decision provides a good overview of vaccine laws in Massachusetts at the time:
This case involves the validity, under the Constitution of the United States, of certain provisions in the statutes of Massachusetts relating to vaccination.
The Revised Laws of that commonwealth, chap. 75, § 137, provide that 'the board of health of a city or town, if, in its opinion, it is necessary for the public health or safety, shall require and enforce the vaccination and revaccination of all the inhabitants thereof, and shall provide them with the means of free vaccination. Whoever, being over twenty-one years of age and not under guardianship, refuses or neglects to comply with such requirement shall forfeit $5.'
In short, towns were allowed to require everyone to get a free vaccination, and adults who refused would be fined $5 (about $150 today). In 1902, the city of Cambridge enacted such a requirement:
Proceeding under the above statutes, the board of health of the city of Cambridge, Massachusetts, on the 27th day of February, 1902, adopted the following regulation: 'Whereas, smallpox has been prevalent to some extent in the city of Cambridge, and still continues to increase; and whereas, it is necessary for the speedy extermination of the disease that all persons not protected by vaccination should be vaccinated; and whereas, in the opinion of the board, the public health and safety require the vaccination or revaccination of all the inhabitants of Cambridge; be it ordered, that all the inhabitants habitants of the city who have not been successfully vaccinated since March 1st, 1897, be vaccinated or revaccinated.'
Subsequently, the board adopted an additional regulation empowering a named physician to enforce the vaccination of persons as directed by the board at its special meeting of February 27th.
The Supreme Court found this vaccination requirement to be within a state's power to enact, and in their decision they reference cases involving vaccinations as a condition to go to school:
And the principle of vaccination as a means to prevent the spread of smallpox has been enforced in many states by statutes making the vaccination of children a condition of their right to enter or remain in public schools. Blue v. Beach, 155 Ind. 121, 50 L. R. A. 64, 80 Am. St. Rep. 195, 56 N. E. 89; Morris v. Columbus, 102 Ga. 792, 42 L. R. A. 175, 66 Am. St. Rep. 243, 30 S. E. 850; State v. Hay, 126 N. C. 999, 49 L. R. A. 588, 78 Am. St. Rep. 691, 35 S. E. 459; Abeel v. Clark, 84 Cal. 226, 24 Pac. 383; Bissell v. Davison, 65 Conn. 183, 29 L. R. A. 251, 32 Atl. 348; Hazen v. Strong, 2 Vt. 427; Duffield v. Williamsport School District, 162 Pa. 476, 25 L. R. A. 152, 29 Atl. 742.
That list references cases in Indiana, Georgia, North Carolina, California, Connecticut, Vermont, and Pennsylvania, indicating that school children across the country were being vaccinated for smallpox, much like they are for a variety of diseases today.
These sorts of vaccination requirements helped control smallpox outbreaks, and by the 1950's smallpox was essentially eliminated from the US. The last major outbreak occurred in New York in 1947, when a couple returned to New York City from a vacation in Mexico. Eugene Le Bar had apparently been exposed to smallpox in Mexico, and caused a small outbreak that resulted in 12 confirmed cases and 2 deaths. As a result of these cases, a massive vaccination campaign was launched to prevent a larger outbreak. Vaccinations weren't required, but an ad campaign and door-to-door volunteers urged people to go to newly set up vaccination clinics, leading to most of the city being vaccinated within a few weeks.