Everyone who joins the military has one thing in common, they must swear-in by repeating the enlisted or officer Oath.
The Oath of enlistment is something that every service member must promise and adhere to for his/her entire military career. From the Oath, you can see that you will be defending the Constitution - not a person. Discipline and accepting orders is sworn to. Finally, you vow to face the UCMJ (Uniform Code of Military Justice) should any disputes arise.
The Oath of Enlistment (for enlisted):
"I, _____, do solemnly swear (or affirm) that I will support and defend the Constitution of the United States against all enemies, foreign and domestic; that I will bear true faith and allegiance to the same; and that I will obey the orders of the President of the United States and the orders of the officers appointed over me, according to regulations and the Uniform Code of Military Justice. So help me God."
The Oath of Office (for officers):
"I, _____ (SSAN), having been appointed an officer in the _____ (Military Branch) of the United States, as indicated above in the grade of _____ do solemnly swear (or affirm) that I will support and defend the Constitution of the United States against all enemies, foreign or domestic, that I will bear true faith and allegiance to the same; that I take this obligation freely, without any mental reservations or purpose of evasion; and that I will well and faithfully discharge the duties of the office upon which I am about to enter; So help me God."
Before you raise your right hand, make sure you understand what you are swearing or attesting to. The oath of enlistment should not be taken lightly, you will be bound by it for the next 4 to 6 years at a minimum.