Implies intention to do the same thing back to someone as they did to you. She didn't invite me to her party, so two can play at that game - I won't invite her either.
Pro Tip 2/3
Warning Message
Used to warn someone they're not the only one capable of a certain action. He started spreading rumors about me? Two can play at that game.
Pro Tip 3/3
Not Literal
The phrase is figurative; it doesn't always involve only two people or a game. If she's being cold towards me, two can play at that game, even with our friends around.