Apart from the problem's intensity, this kind of confession can turn into a blame on you, but most of the time, it ends in appreciation. It is important to remember to be gentle while breaking this news to her, so that she doesn't break out on you.
Ask Her About Any Signs and Changes
Cheaters always leave their signs behind. Instead of telling her directly, you can ask her about any recent changes she noticed in her boyfriend, if he has been treating her the same or not. While she may not have considered this before, she might come up with some odd things which you can then relate to the bad news that her boyfriend is a cheater.
Confront the Boyfriend
Confronting the boyfriend is a good idea, so that if there is any conscience in him, he might regret cheating on your friend and tell her by himself. Talk to him about his unethical and unfair behaviour and disloyalty towards is friend. If he is not affected by this, tell your friend about his cheating yourself.