Doing this is never easy. You have to be alert at all times. People might simply exude sincerity in their mannerisms and words, but one should still be cautious and not accept a person at face value. Every person, including yourself, should prove themselves multiple times, before becoming worthy of trust.
No matter how strong one's beliefs are, no human has been able to match their actions accordingly, all the time. Compromises are constantly made, and deeds are done which contradict our thoughts. So, to a certain degree, each one of us is a hypocrite. Unfortunate though it is, this is a deeply embedded part of human society.
Being upfront and honest with co-workers or family members about your feelings on their hypocrisy will ensure that they will not bug you for a while. However, it can also lead to hurt feelings and blocks in relationships, which is why calmness and politeness is very important. This approach takes practice and thought, which may not be easy for everyone. But the rewards are worth it.
If a hypocrite criticizes you, sincerely take a look at what he is saying, and whether it is genuinely a good solution to the problem. Remember, it is not important whether you are right or wrong, but that the situation is completely resolved. You might find that their advice benefits you in the end, even if they don't follow it themselves.
Directly accusing a hypocrite of not practicing what he preaches is useless, as such people tend to immediately go on the defensive, and try to divert the attention back onto you or someone else. Your best bet would be to use subtle suggestions which will gradually bring their attention to what they are doing, and if and when they do follow through, make sure to be appreciative, without pointing out their past faults.
It is important to get rules defined as to one's duties, and think about the situations which bring out hypocritical behavior in a person. This will allow you to be prepared well in advance. Now you can persist in your resistance, or accept that the person will not change, and that you are the better person.