How to Deal with Office Politics
Do not participate in office politics. You may have to recognize they exist, and perhaps even take part in them involuntarily, but do not encourage or exacerbate them.
Do not gossip. If you hear someone else gossiping, politely remove yourself from the situation. Gossip ALWAYS spreads, often back to the source.
If you have a valid complaint, express it through the proper channels: your direct supervisor or human resources representative.
Do your work to the best of your ability, and make sure there is proof of it. Create a paper (or email) trail. Copy your boss and anyone else necessary on emails. Remember, if you mention someone or refer to something that pertains to them, copy them on the email.