I'm very lucky. My wife and I got married quickly, within a year of meeting one another--and we were both young. We've been through some hell together. It took us over ten years to mature and to learn how to get through a lot of issues--money, sex, religion, in-laws, health, the whole spectrum. We both have considered giving up at different points, but we've both made the commitment to stick with it. It's paid off, immensely. Now we have a very good marriage. Passionate, companionable, supportive. We both do our own thing, and we both love to be together.
So my advice is to be very choosy about who you marry in the first place, and then, once you make the commitment, to stick with it. Give it a second, third, fourth, fifteenth chance. Don't give up until and unless it is clear that you will be miserable sticking with it, and then make sure the faults do not lie in yourself. It's worth the effort.