The stories shared above show many of the ways this can play out. Co-location is not guaranteed, but the Services will try. As it does in any marriage, honest communication and a flexible attitude will help hold the relationship together. It is a joint decision. It could be pilot-pilot, Navy ship-sub, Army Doctor-Marine ground - all of it will be a challenge.
Military-civilian is a challenge too! Civilian spouses who want to work outside the home have to be creative and adaptive, with portable careers, even as they hold down the homefront while the uniformed spouse deploys or is on an unaccompanied tour. Or it might be the right thing to do for the family to stay in one place because of the kids' school, medical or family situation, while the military spouse does a "geographical bachelor" tour.
Most military women I know marry military men, current or former, because it just seems to work that way - better understanding of the demands.
My husband and I took several tours apart, though we could have been in the same location, but it would have been a lateral career move for one or both. For us, we both wanted command (we managed 6 between us), and we wanted it for each other. We coped with the separations through strong communication, committed visits and agreements of not-to-exceed timeframes. Of course, in some ways we had it easier at the start of our relationship, not having the options of Skype, FaceTime, email, texts, the feeling of being constantly connected. It was static-filled phone calls at odd hours from out of the country and letters, which always arrived in bunches after weeks of nothing, if a deployment was involved. We were Navy-Navy, and for us, we could handle not being together all the time. I emphasize "for us." Every couple has to determine what is tolerable and what is not acceptable, for how long, and clear about what expectations are.
Going on 34 years married come this September. We had our hard times, but we worked it out. You cannot bury resentment, because it will flare up in a poisonous way in an argument that wounds both sides. Both parties have to willingly commit to a shared decision, with no "I only did this because you ..." conversations. Bless my wonderful DH, he puts up with my independence and strong personality, being pretty much that way himself, and the chemistry worked for us. I look back and don't know how we did it - one stretch he went 4 tours of sea duty back-to-back - but we took it day by day, and trusted each other with absolute faith.