Do a good job. Work hard, be conscientious with your tasks, and friendly to your co-workers. Your boss will see that you do a good job, that you are a team-player, and are too valuable to lose to office politics.
The reality:
Your boss does not care who does a good job as long as the job gets done. The fact that you do a good job does not single you out as the boss is more likely to think that his or her management skill is what motivated you to do a good job, and that a trained monkey could do your job if they had an awesome boss too.
Conventional reasoning:
If you have a legitimate complaint about a co-worker you should document it and report it to a higher up.
The reality:
This hinges on whether you are a better suck-up than the person you are reporting. If they are the number one lackey you are screwed no matter how legitimate your complaints are. You will be discouraged from taking any actions, your name will probably be mentioned to the subject of the complaint and your life will be made hell both by your boss and by the co-worker.
Conventional reasoning:
Try to reason with the problem co-worker and come to an amicable working-relationship.
The reality:
Unless this reasoning takes place in the back of a windowless van and they are duct-taped to metal chair to which you have attached live jumper cables it probably won't come to anything. In fact, what it might do is indicate to them that they are having an effect on you, thus making them feel powerful.
Conventional reasoning:
Confront the co-worker, meet fire with fire. If they are making your life miserable you should go to them and tell them that you are not intimidated, and that you know what they are doing. Get in their face and make them understand that you are not just going to passively sit down and take their attempts to undermine you.
The reality:
Any show of aggression will be met with the trademark puzzlement of the passive-aggressive. They will do their best to avoid confrontation and to pacify you, but then ratchet up their plans for your destruction.