I agree that if the person wants to they will, but a good way to prevent someone who typically wouldn't from doing something like that is to treat them right! Don't leave anything lacking in the relationship and that doesn't just mean sex! Include them, spend time with them, share interests, occasionally try something that's new to both of you! Make sure they feel loved and appreciated. Have open communication.
Those are the best ways to prevent cheating in a person who would be on the fence about things like that, or typically wouldn't.
To those who just are that type of person if they've cheated in the past and it wasn't due to their partner not doing what I've stated above chances are it will happen again and if you are ever the person they cheated WITH, don't think that because they cheated with you that you're special, because often, there is someone special on the side if they are with you too.
Honestly, I can't stand cheaters!