The Constitution requires the U.S. government to protect citizens from a foreign invasion, protect citizens against domestic violence and guarantee a republican form of government. The government refers to this section of the United States Constitution as the "Guarantee Clause."
The "Guarantee Clause" got its name because it makes certain promises to the states, which carry over from the responsibilities of Congress under the Articles of Confederation. Furthermore, these guarantees are part of a larger doctrine which basically states that, despite the U.S. government's decentralized approach, the nation must present itself as a unified front to the outside world when it comes to foreign policy. This is part of how the government will protect the states from a foreign invasion.