Caring what other people think is deeply human, deeply useful for social bonding, and ineradicable as a habit.
But this human tendency can also make us fearful, cruel, ignorant, lazy, mediocre, and unhappy. A lot of folks who went along with the Soviets and the Nazis probably did it – in part – from a desire to fit in and be liked. So it pays to know how to turn off our conformity mode once in a while.
There are many tactics for this – here are two:
First, think less of what other people value.
Contempt is an ugly emotion, to be sure. But it has its uses, and can be directed at the stupid things people like, rather than the people who like them.
If you find the ideologies of the mass to be laughably stupid, their moral choices repulsive, their aesthetic tastes jarring, and their tactics outrageous, you won’t have much trouble resisting calls to join them. Your natural disgust will do the work for you.
Get clear with yourself on what you don’t like/hate, and then don’t do those things or serve the ideas or people who promote those things.
Of course, if you can *think less often* about the tastes and demands of others, you can get the same effect without the contempt. Which leads well into the next suggestion:
Think more of God.
Keep a transcendent Being, value, or your conscience before you and with you at all times. The “inner voice” which keeps you on the straight and narrow path has its own way of being a “peer” and exercising “peer pressure” on you, and it’s usually the right one. If you must cave, choose to cave to God, or to your conscience.
Remember that God is more powerful than the crowd, and that the consequences of betraying God (and therefore your highest/best self) are far greater than any consequences which the crowd could visit upon you. Remember also that God is with those who are with Him. Even if you are alone against the crowd, you will not be alone.