From CRS report:
The public health authority of the states derives from the police powers reserved to them by the Tenth Amendment to the U.S. Constitution. The authority of the federal government to prescribe quarantine and other health measures is based on the Commerce Clause, which gives Congress exclusive authority to regulate interstate and foreign commerce. Thus, state and local governments have the primary authority to control the spread of dangerous diseases within their jurisdictions, and the federal government has authority to quarantine and impose other health measures to prevent the spread of diseases from foreign countries and between states. In addition, the federal government may assist state efforts to prevent the spread of communicable diseases if requested by a state or if state efforts are inadequate to halt the spread of disease.