Lady Mary was not ok with her married neighbor hitting on her. She felt it was wrong and that she had to act. And act she did. She tricked him to go to her house when his wife was not around but instead of the sex he hoped to get, he ended up being forced to eat her shit and drink her urine. That is how he stopped trying to cheat on his wife.