Freud proposed that the human psyche could be divided into three parts: Id, ego, and super-ego. Freud discussed this model in the 1920 essay Beyond the Pleasure Principle, and fully elaborated upon it in The Ego and the Id (1923). The Id is the impulsive, child-like portion of the psyche that operates on the “pleasure principle” and only takes into account what it wants, regardless of consequences.
The term Id (‘the It’ or ‘the Thing’) represents the primitive urges to possess, conquer, dominate and achieve pleasure. It can be seen very clearly in young children, who have not yet learnt to mask their feelings.
The Super-ego is the moral component of the psyche, which makes a clear distinction between right and wrong, and makes no allowance for special circumstances.
The term Ego entered the English language in the late 18th century. Ego is Latin for ‘I am’, and it attempts to get a balance between the impractical hedonism of the Id and the equally impractical moralism of the Super-ego; it is the part of the psyche that is usually reflected most directly in a person’s actions.
When overburdened or threatened by its tasks, the Ego may employ defense mechanisms including denial, repression (into the unconscious), and displacement.
Information taken from Wikipedia