According to Freud, defense mechanisms are protective methods, by the ego, that reduce anxiety by unconsciously distorting reality.
Definitions & Examples:
Repression - banishing anxiety-arousing thoughts, feelings, and memories from consciousness.
e.g. blocking out your traumatic childhood
Regression - retreating to a more infantile stage of development in the face of anxiety
e.g. sucking your thumb when scared
Displacement - shifts sexual or aggressive impulses toward a more acceptable or less threatening object or person.
e.g. punching a pillow to release stress
Reaction Formation - unconsciously switching unacceptable impulses into their opposites; in short, people acting opposite the way they feel.
e.g. a little girl pretending to a hate a boy, although in truth, she likes him
Projection - disguising threatening impulses by attributing them to others.
e.g. suppose you and another individual don't get along, so you treat each other rudely. Projection would be you saying, "I'm only rude to him because he hates me." although the exact opposite may be the case - He's only rude to you because you hate him.
Rationalization - offering self-justifying explanations in the place of real, more threatening unconscious reasons for one's actions.
e.g. many student drinkers claim they only do so to be sociable; students who don't study claim the best lessons are taught outside of class, or all work and no play makes Jack a dull boy.