"Masks" are but one part of it. You don't put on masks simply for, as kaijyuu suggests, avoiding hate or pain, you do it to deal with the world. The world, in turn, sees only this outer exterior, only what you show or choose to show. Showing yourself leads to pain not just because people hate you, but sometimes because they don't believe you. Don't you know a person whose strange behavior defies your explanation? You're not falling into something they can deal with easily, and your real face, will be just another mask. More importantly, you end up used and abused because you take everything personally.
The other half of the coin is using masks so thoroughly and effectively that the person and his true feelings are inscrutable. You can, as kaijyuu does, call these people dishonest, or even sociopaths, but they are just playing the system to win (which kaijyuu seems to show a profound dislike for in general). In the book, they describe - not through the character himself, but his wake, and the things he leaves around - a person named Rineheart who at the same time a bookie, a lover, preacher, a helper of the poor, a pimp, and more. None or all of these things may be who he is, but his masks are effective in that people see exactly what they expect to see: A preacher praising god and cursing sinners, a bookie trying to get some money, a lover trying to help a girlfriend away from an abusive partner, and none of these things are necessarily the real Rineheart at all, or they might be perfectly reflective of his character, and for truly gifted individuals you can never really know.
And the worst, or at least most important part, is that it applies to everyone and is basically how society functions. You can't see a person collecting money for the Salvation army and suspect them of being a criminal, you can't look at a hardened criminal and say he probably goes to dapper dinner parties, these assumptions are basic necessities.
You're doing that right now, when you judge people for wearing masks when that might be their true faces, or vice versa. And the question of what a person does is almost irrelevant, the thinking human being is inside, and that person can be anywhere along a spectrum of honesty in their masks. The only truth is in people who wear their heart on their sleeves, and that clearly isn't the way to live. Worse, you need to keep these masks on or things begin falling apart. You can't flip your boss off even if you're really pissed, as kaijyuu said. People expect certain things, and someone who is messing with them is just automatically weird, as does being rude.
The only way through is a hard middle-ground. You have to remain true to yourself without sacrificing the world to do it. And I'll be honest,
it's hard. Some can't even conceive that there is anything beyond the spectrum of truth v. expectations. And as for the real you, well, read this quote:
When I discover who I am, I'll be free.