If you think you have a troubled marriage, then it must be that those troubles are more than just fights. In every marriage there are a lot of fights - after all, when two people with completely different interests, manners, likes and dislikes live under the same roof, there are bound to be a lot of problems. Unfortunately, more often than not those problems lead to a divorce. An overwhelming majority of marriages end in divorce - but do not let that dishearten you. You can fix a troubled marriage, and I am going to show you how.
First of all, if you are in a panicked state right now (most people are, when they think their marriage is heading towards a divorce), you need to get out of it as soon as possible. Panic leads you to desperation, and you take desperate measures to prevent a divorce. Those measures are almost always knee-jerk reactions like apologizing, saying things like "I have changed! I promise that will not happen again!" to save your marriage, and stop the divorce from happening. Unfortunately, those desperate measures do nothing to save a marriage and do more harm than good. So you need to come out of your panicked state, straighten yourself out - know that you CAN fix your troubled marriage, but you do need to stop acting desperately to achieve this.
Your spouse is fed up with you, or with married life - that's why he or she might be thinking of a divorce. You should make sure that you do not make your spouse even more fed up with things. Do not act desperate, and do not talk to your spouse a lot. This will both prevent new fights, it will allow an "alone time" for both of you to think about the marriage and the problems, and it will make your spouse somewhat miss you, consciously or subconsciously.