The US Military is quite the exception in the world in that,
unlike most militaries, they require their officers to undergo
college as a prerequisite to commissioning. The ROTC, which stands
for Reserve Officer's Training College, essentially is found in
many campuses in the US whereby males and females enroll at a
college and the ROTC and receive training while they take classes.
If they score well enough (GPA and all) and get a good grading as
an officer cadet, they may be offered scholarships from the
military, in return for service. Many officers subsequently
sign-on. Also, because they are in reserves, they can be called
upon to fight in wars, such as in Iraq. They either serve a tour of
duty after graduation in the National Guard, or just end up in the
reserves. (though I think they do serve a tour of duty at
least).
The US military also has separate academies, most notably the US
Air Force Academy in Colorado, West Point in New York, the US Naval
Academy in Annapolis, Maryland which also follow the same system.
Officers must get a college degree in addition to getting
commissioned. Submarine commanders tend to be nuclear engineers, I
might add.