In order to deal with conflict and problems in life, Freud stated that the ego employs a range of defense mechanisms. Defense mechanisms operate at an unconscious level and help ward off unpleasant feelings (i.e. anxiety) or make good things feel better for the individual.
The ego, driven by the id, confined by the superego, repulsed by reality, struggles to master its economic task of bringing about harmony among the forces and influences working in and upon it; and we can understand how it is that so often we cannot suppress a cry ‘life is not easy’!
If the ego is obliged to admit its weakness, it breaks out in anxiety regarding the outside world, moral anxiety regarding the superego, and neurotic anxiety regarding the strength of the passions in the id. (Freud 1933, p. 78).