The first key to figuring out how to get back with your ex is to leave your ex alone for at least a month - if at all possible longer than a month will work even better. So break all contact with them and give your ex plenty of time to think things through.
Often times in the heat of the breakup things get said and positions get taken that given time, are soon relinquished as reasoning takes over. So if you want to get to the heart of how to get back with your ex then seriously, give yourself and your ex some time.
If you don't allow for this space to think and you continue trying to push the issue to get your ex back before the time is right, then what will happen is that the more you push, the harder your ex will push back. Remember, your ex has walked out on the relationship and clearly demonstrated that they need time to think and be left alone, give them that time.
If you're worried that all looks lost because your ex is dating someone else, then you need to remember and hold onto the fact that a lot of rebound relationships just don't last. Chances are your ex is dating that person as a way to convince themselves that their relationship with you is really over. However, just because they're trying to convince themselves their relationship with you is over for good. Guess what? It doesn't mean that it is.
It is a statistical fact that rebound relationships are fraught with difficulties and very rarely work because the person on the rebound is still emotionally connected to their ex. So don't waste a whole lot of time worrying about someone your ex is currently dating.
The truth is getting your ex back is more about the two of you than anyone else, so make sure that you keep on top of your appearance, you're not doing anything to alienate your ex and that you're appearing in control and pretty soon you will have stopped wondering how to get your ex back, because they'll be back with you.