You need to read:
- The Constitution
-
The Insurrection Act of 1807 (10 USC §§ 251–255)
which empowers the U.S. president to call into service the U.S. Armed Forces and the National Guard:
- when requested by a state’s legislature, or governor if the legislature cannot be convened, to address an insurrection against that state (§ 251),
- to address an insurrection, in any state, which makes it impracticable to enforce the law (§ 252), or
- to address an insurrection, domestic violence, unlawful combination or conspiracy, in any state, which results in the deprivation of Constitutionally-secured rights, and where the state is unable, fails, or refuses to protect said rights (§ 253).
There is so much misinformation packed into this one paragraph that it is difficult to decide where to start to sort it out.
Just out of curiosity, who do you think is Commander in Chief of the armed forces during peacetime?