In my case, I found out because my ex was stupid--loooooooooooooooooooooooong story short, "the other woman" was a mutual friend of ours...one weekend our whole group of friends were together and she and he were flirting a lot, which they'd never done before, and in the looks that kept passing between them I just got the feeling they had this secret between them (I liken it to the way your parents would give each other meaningful looks over your head when you're a kid). Then the next weekend the group was together (I wasn't) and after everyone else left, she "had" to spend the night at his place because she supposedly couldn't stay with someone else, which I found fishy in light of what I'd seen the previous weekend. A couple days later I told him that him spending the night alone with other girls, even if they were "just friends," was not something I was comfortable with and all of a sudden he clammed up and started shutting me out, then finally said we needed to break up. Then not long after that I saw them together.
IOW, he sort of dug his own grave because it was his acting guilty that clued me in.