defense mechanism

noun

1.
(psychiatry) an unconscious process that tries to reduce the anxiety associated with instinctive desires