Someone who plays the victim always feels that other people or circumstances are their downfall. They never just admit their bad choices or roll in the bad situation. In an a affair, blaming your spouse or the bad relationship is playing the victim.
To stop playing the victim, focus on YOUR role. A bad relationship or poor treatment from a spouse can make you more vulnerable to an affair, but you and only you made the decision.
All of the mistakes in our lives come down to our weaknesses. We all have them, you aren't a bad person. But until you acknowledge your active role, you are playing the victim.