From this link, the word hypocrite is rooted in the Greek word hypokrites, which means “stage actor, pretender, dissembler.” So think of a hypocrite as a person who pretends to be a certain way, but really acts and believes the total opposite.
From this wiki about the Pharisee's hypocrisy, it's easier for me to understand it. For example, point 5 on that page says:
They presented an appearance of being 'clean' (self-restrained, not involved in carnal matters), yet they were dirty inside.
In Galatians, Paul refers to Peter as a hypocrite:
When Cephas came to Antioch, I opposed him to his face, because he stood condemned. For before certain men came from James, he used to eat with the Gentiles. But when they arrived, he began to draw back and separate himself from the Gentiles because he was afraid of those who belonged to the circumcision group. The other Jews joined him in his hypocrisy, so that by their hypocrisy even Barnabas was led astray. Galatians 2:11-13 (NIV)
But I can't figure out in what way Peter is being a hypocrite.
He could be being a hypocrite by claiming not to force gentiles to obey Jewish laws, while actually making them do exactly that. But that would seem to contradict his experience with Cornelius, which show he wouldn't force gentiles to obey jewish law.
Alternatively, he could be claiming we do need to force gentiles to follow jewish customs, while actually not believe that was true. But in that case, there would be no reason for him to be scared of the circumsision group, since outwardly he appeared to agree with them.
Since neither of these seem correct, how is Peter being a hypocrite, according to Paul?