I can't speak for everyone but in my case, this is what happened...
I remember one day I was sitting on the edge of my bed in tears and feeling so distraught. I prayed outloud, "Lord, how will I know when it is finally time to say 'enough'? When will I know it's time to go?"
And without hesitation the answer that came into my mind was this, "when you can't take it anymore".
At that time I hadn't reached that point yet. But a few months later, I did. I knew in my heart that I could not go on that way anymore. Something had to be done. That is when I made the decision to leave. In my heart, even in those moments there was a weak part of me that remembered the good times and wanted them back, a part that thought, if he asks me to stay I might. But even then I knew that if I did, it would never work and I'd eventually end up still leaving.
It is a decision we are all faced with on an individual level. For me, I sometimes think waiting till that point might have been too long. By then the love had died and we had only shambles of a relationship, it was too late to fix anything. I think speaking up about the problems is crucial, way before you reach that point.
Once you have tried to talk it out, tried to make changes, tried to seek some help from outside support, once you have exhausted the avenues then you know that you can't do anything more then you already have.