I’ve never understood the desire to go backwards in life. I believe in putting everything you have into a relationship when you fall in love. If it doesn’t work out there is nothing left for you to offer a second time around. (There is nothing better than your best!)
Having said that if you are determined to attempt to get back with someone you must first think about what led to the breakup. It's also important to keep in mind who dumped whom. (Usually the person who was dumped) is more willing to give it a second chance assuming not too much time has gone by giving them an opportunity to either find someone else or realize they are better off without you.
However if you are the person who ended the relationship all you can do is apologize and explain. Explaining entails what you were thinking/feeling and what you now think/feel. It also should include what you have learned from this experience and how it will help to pave the way for a different and better relationship if given a second chance. The rest is left up to the person listening.
Don’t be surprised if they need some time to let things digest before making a decision. In fact you may wish to tell them to take some time and get back to you. (No pressure) There still is no guarantee. (This is how mature people go about mending fences.)
Immature people usually play games: attempt to incite jealousy (showing up with a date at places the ex frequents), push for "instant friendship" (hoping the ex will change their mind over time), pull a "vanishing act" (their goal is raise the ex's curiosity so much that they try and reach them after not seeing or hearing from them). No matter what always remember your future lies ahead of you and not behind you. An ex is an ex for a reason and it's usually a good reason! Unless one of you has made some (major changes) it's likely the relationship will have the same conclusion. Sometimes you are better off leaving a broken mirror alone instead of cutting yourself up trying to put it back together. - Best of luck!