Military divorces are similar to any other kind of divorce. The military believes that divorce is a civil matter, so you'll go through a divorce just like anyone else.
There are a few differences, though. For example, you will need to decide where you want to get a divorce. It might be in the state where your military base is, your home state where you hold residence or where your spouse is a resident. There could be other courts with jurisdiction, too, depending on where you got married.
What happens if your spouse files for divorce while you're deployed?
The good news is that nothing can happen when you're unable to attend court due to active service and deployment. The court understands that it would be unfair to hold proceedings when you are not there to protect yourself or have little time to think about divorce. You'll be able to apply for a temporary stay thanks to the Servicemembers Civil Relief Act. Your attorney can handle requesting that stay if you are unable to do so yourself due to deployment.
Will your service impact your rights to custody?
If you have kids, your service should not be used to determine your custody rights. However, it should be clear that the other parent is more likely to obtain custody if you are not capable of caring for your child due to deployment, at least in the near future. You can always seek a modification of child custody after you return from deployment if that's the case.
Your attorney will inform you about your rights and what you can do to protect them as you go through your divorce.