In a world where we all have to go out and make a living, knowing how to survive - the good, the bad and, the ugly of an office /work environment can be the deciding factor in whether or not one succeeds on the job and, have some form of job satisfaction.
Dealing with the good, bad and, ugly sides of others in an office /work Environment is all part of the equation of trying to make living. It is a Environment filled with all kinds of people with different goal and different source of what makes them happy as a person.
It is an environment where your best friend could be your worst enemy. And the one you cannot stand his or her gut could be your true friend. (note that I did not use the word "best" friend. I think the use of best friend has been trivialized - I have true friends. People are sometimes going to be true and other times untrue. That's part of being human. One should relate to others per their actions towards one. No best, but true friends)
An approach one might consider, is a view that, one did not know any of the guys/gals before joining the corporation. One does not have to know them after leaving. One should try and have fun while striving to provide the corporation with the best of service for which one was hired.
Having fun by interacting with co-workers, talking and listening to their complaints / gossips, saying little and, never ever talk bad about a co-worker to another. If you are a manager, limit your interaction with those you have to supervise.
Never trust the one that has all the gossips and talks bad about other employees. Stay as far away as possible from such a co-worker. If he /she can talk bad about others, he /she will also talk bad about you. They are toxic to ones career.
If you are one of those who play office politics, keeping a co-worker with all the gossips close, can be an asset. But remember, they are, toxic. Associate too much with such a person at your own risk. And, they usually come with bad Karma from all the bad talking of others.
Effective managers usually have one thing in common, they have their ear to the ground, they usually know what and who is saying things about them. Loyalty is the key word to being in one’s boss good book. Most boss would stand by one if one is loyal. Where one has nothing good to say about the boss, best approach is to say nothing.