Of course, there are many reasons trust can be lost. Sometimes it's fairly 'small' like when your spouse belittles you in front of others. Other times it can be even worse such as in the case of infidelity. This can be virtually impossible to overcome.
If you're willing to try, step one is to figure out what you did to break the trust in the first place. Obviously, if it was infidelity that will be pretty clear. But if it was something a little less extreme like ridiculing your partner or making fun of them all the time, it might take some digging to figure out why you felt the need to hurt the one person you're supposed to love above everyone else.
Sometimes the more subtle betrayals can be a sign of some deep seated resentment against your partner. You need to get to the bottom of that issue to figure out what it is before you can make any kind of change.
If you've cheated than you will also need to figure out why. In many cases it's about a lot more than just being attracted to another person. It's often a sign that you're unhappy with your partner and / or a severe character flaw of yours. Whatever the case may be the first step to trying to rebuild trust with your partner is to identify the problems so that you can fix them so you never repeat your mistake.
It's going to take a lot to get your partner to trust you again, the last thing you want to do is to repay that trust by hurting them and betraying them again. Before you ask for a second chance you better make darn sure you're up to the challenge of never betraying them again.
Once you've identified the problem and have taken steps to make sure it doesn't happen again, it's time to talk to your partner. Explain to them that you've been working on yourself and fixing your issues. Ask them for another chance. Even if they say 'yes' you have to understand that you'll essentially be on 'probation' for a long time.
You have to be willing to overlook a little paranoia on their part. It's going to be very difficult for them to completely let their guard down again and it's likely to take quite a long time before they do. They'll need to see a lot of proof that you've really changed first.
Regaining trust in a relationship will take a lot of time, love and patience. It's not impossible if both parties are willing to try, but make sure that both of you enter into the process with your eyes wide open and don't expect a quick fix.