It wildly varies with how the breakup happened and the state of both people afterward. My first major relationship ended with both of us being civil and deciding that we were great buddies, but the romance part of things was becoming strained. So we both agreed it was time to break it off, were a little sad, got over it, and are now great friends. On the other hand, the relationship after that ended with my boyfriend becoming a completely different person over the course of a week -- he dropped every hobby he once had, started never going outside, changed a large chunk of his worldview, and broke up with me through a long and messy series of awkward conversations. Now, we have absolutely nothing in common, and to boot we never agreed on anything in terms of the breakup; it was all "But you told me you loved me," "Well, I guess I was wrong, sorry, goodbye."
...tl;dr, when the relationship has spent its course and both people agree to end it, you get the Good Ending where everyone can be buddies. When one person is left in the gutter and the other takes off happily, there's too much chaos for friendship to happen immediately, if at all. And you can really only be friends if the person is still "friend" material for you; i.e. if he/she hasn't changed too much for you to identify with or want to hang out with anymore.