There is just something about a two-faced coworker that makes the work day even longer and more dreadful. Workplace dynamics are almost as bad as schoolyard dynamics. There are gossips, backstabbers, kiss ups, bullies and goody goodies. Why can't a person go to work, do their job, collect their paycheck and go home? The answer to that is simple: life just doesn't work that way for some reason. Some people are not happy unless there is some sort of drama. The particular drama being referred to here is performed by two-faced people. Yes, they are annoying and yes, there are certain ways to deal with them when you have to work with them on a daily basis.
Mum's the word
Under no circumstances, divulge your personal information to people at work. The less you reveal, the less ammunition they have to use against you later. This is just good sense, especially if you know or suspect a coworker of being two-faced. A good way to think about it is if you do not want something repeated, then do not say it to begin with! It's okay to be friendly and even develop friendships with the people you work with, however you should be guarded as to what information you hand out. Unfortunately, even the nicest people can turn on you if it will benefit them to do so.
Keep yourself in the loop
It is not a good idea to participate in office gossip, however it might be a great idea to keep an ear on the grapevine. One thing to keep in mind is to never spread any vicious or "juicy" gossip you hear. You do not want to become partly responsible for hurting someone else. The other reason you want to keep yourself in the loop is that you will make yourself a less likely target if the "loop" knows you are listening.
When you figure out that your coworker has stabbed you in the back, then confront them about it. You must realize that you should remain polite and professional while confronting them. It may sound much better to call them lots of expletives and tell them where to go and how to get there, but then, what would that make you sound like? You are an adult and must prove you can act like one, even if they cannot do the same. Let them know that if they have a problem with you or how you do your job, then now is the time to get it out in the open. They will either talk or back down. Either way, they will know that they are not nearly as sneaky as they thought they were.
Lodge a formal complaint
There is huge difference between being a crybaby and not letting a coworker get away with sabotage. Have a quiet discussion with your boss about the backstabbing party and be sure to bring proof of damages you suffered/are suffering. If you do not produce some sort of proof, then you are simply tattling on someone and that should have been left back on the playground. You want to inform your boss of what the backstabber is doing because it is wrong and can potentially cause serious professional damage to someone someday.
The best way to deal with a backstabbing coworker is to avoid giving them anything to talk about. If they do not have any ammunition, then their attacks, so to speak, are pretty weak and people will see through them. Its always best to try and get along with coworkers, but sometimes you just have to put your guard up and leave it that way around some people.