A defence mechanism is an unconscious way to protect the personality from unpleasant thoughts which may cause anxiety. This can work well in small doses but they can also be the cause of a neurosis.
Displacement. Redirecting emotion from a 'dangerous' object to a 'safe' object. For example punching a cushion when angry at your partner.
Projection. Attributing one's own emotions or desires to an external object or person. For example saying others hate you when it's you who hates the others.
Rationalisation. Inventing a logical reason after an emotional act is made.
Reaction formation. A feeling is converted into its opposite, for example turning hate into love.
Regression. Behaviour reverts to a previous age.
Repression. Thoughts unacceptable to the Ego are moved into the unconscious where they cannot be easily accessed.
Sublimation. A 'healthy' form of displacement, for example playing sport to relieve stress or anger.