Id, ego, and super-ego
Id, ego, and super-ego are the three parts of the "psychic apparatus" defined in Sigmund Freud's structural model of the psyche; they are the three theoretical constructs in terms of whose activity and interaction mental life is described. According to this model, the uncoordinated instinctual trends are the "id"; the organized realistic part of the psyche is the "ego," and the critical and moralizing function the "super-ego." 
Even though the model is "structural" and makes reference to an "apparatus", the id, ego, and super-ego are functions of the mind rather than parts of the brain and do not necessarily correspond one-to-one with actual somatic structures of the kind dealt with by neuroscience.
The concepts themselves arose at a late stage in the development of Freud's thought: the structural model was first discussed in his 1920 essay "Beyond the Pleasure Principle" and was formalized and elaborated upon three years later in his "The Ego and the Id." Freud's proposal was influenced by the ambiguity of the term "unconscious" and its many conflicting uses.
The terms "id," "ego," and "super-ego" are not Freud's own but are latinisations 
-riginating from his translator James Strachey. Freud himself wrote of "das Es," "das Ich," and "das Uber-Ich"respectively, "the It," "the I," 
and the "Over-I" (or "Upper-I"); thus to the German reader, Freud's original terms are 
more or less self-explanatory. The term "das Es" was borrowed from Georg Groddeck, a German physician to whose unconventional ideas Freud was much 
attracted. (Groddeck's translators render the term 
in English as 'the It').

# Id
The Id comprises the unorganized part of the personality structure that contains the
basic drives. The id acts as a pleasure principle: if not compelled by reality it seeks immediate enjoyment.
It is focused on selfishness and instant self-gratification. Personality, as Freud saw it, was produced by the conflict between biological impulses and social restraints that were internalized.  The Id is unconscious by definition. In Freud's formulation,
The id stands in direct opposition to the super-ego. 
Developmentally, the Id is anterior to the ego; i.e. the psychic apparatus begins, at birth, as an undifferentiated id, part of which then develops into a structured ego. Thus, the id:
The mind of a newborn child is regarded as completely "id-ridden", in the sense that it is a mass of instinctive drives and impulses, and demands immediate satisfaction. This view equates a newborn child with an id-ridden individualoften humorouslywith this analogy: an alimentary tract with no sense of responsibility at either end.
The id is responsible for our basic drives such as food, water, sex, and basic impulses. It is amoral and egocentric, ruled by the pleasurepain principle; it is without a sense of time, completely illogical, primarily sexual, infantile in its emotional development, and will not take "no" for an answer. It is regarded as the reservoir of the libido or "instinctive drive to create".
Freud divided the id's drives and instincts into two categories: life and death instincts - the latter not so usually regarded because Freud thought of it later in his lifetime. Life instincts (Eros) are those that are crucial to pleasurable survival, such as eating and copulation. Death instincts, (Thanatos) as stated by Freud, are our unconscious wish to die, as death puts an end to the everyday struggles for happiness and survival. Freud noticed the death instinct in our desire for peace and attempts to escape reality through fiction, media, and substances such as alcohol and drugs. It also indirectly represents itself through aggression.

# Ego
The Ego acts according to the reality principle; i.e. it seeks to please the ids drive in realistic ways that will benefit in the long term rather than bringing grief.
The Ego comprises that organized part of the personality structure which includes 
defensive, perceptual, intellectual-cognitive, and executive functions. Conscious
awareness resides in the ego, although not all of the operations of the ego are 
conscious. The ego separates what is real. It helps us to organize our thoughts and make sense of them and the world around us. 
According to Freud,
In Freud's theory, the ego mediates among the id, the super-ego and the external world. Its task is to find a balance between primitive drives and reality (the Ego devoid of morality at this level) while satisfying the id and super-ego. Its main concern is with the individual's safety and allows some of the id's desires to be expressed, but only when consequences of these actions are marginal. Ego defense mechanisms are often used by the ego when id behavior conflicts with reality and either society's morals, norms, and taboos or the individual's expectations as a result of the internalization of these morals, norms, and their taboos.
The word ego is taken directly from Latin, where it is the nominative of the first person singular personal pronoun and is translated as "I myself" to express emphasis.  The Latin term ego is used in English to translate Freud's German term Das Ich, which literally means "the I".
Ego development is known as the development of multiple processes, cognitive function, defenses, and interpersonal skills or to early adolescence when ego processes are emerged.
In modern-day society, ego has many meanings. It could mean ones self-esteem; an inflated sense of self-worth; or in philosophical terms, ones self. However, according to Freud, the ego is the part of the mind which contains the consciousness. Originally, Freud had associated the word ego to meaning a sense of self; however, he later revised it to mean a set of psychic functions such as judgment, tolerance, reality-testing, control, planning, defense, synthesis of information, intellectual functioning, and memory. 
In a diagram of the Structural and Topographical Models of Mind, the ego is depicted to be half in the consciousness, while a quarter is in the preconscious and the other quarter lies in the unconscious.
The ego is the mediator between the id and the super-ego, trying to ensure that the needs of both the id and the super-ego are satisfied. It is said to operate on a reality principle, meaning it deals with the id and the super-ego; allowing them to express their desires, drives and morals in realistic and socially appropriate ways. It is said that the ego stands for reason and caution, developing with age. Sigmund Freud had used an analogy which likened the ego to a rider and a horse; the ego being the rider while the id being the horse. The horse provides the energy and the means of obtaining the energy and information needed, while the rider ultimately controls the direction it wants to go. However, due to unfavorable conditions, sometimes the horse makes its own decisions over the rocky terrain.
When the ego is personified, it is like a slave to three harsh masters: the id, the super-ego and the external world. It has to do its best to suit all three, thus is constantly feeling hemmed by the danger of causing discontent on two other sides.  It is said, however, that the ego seems to be more loyal to the id, preferring to gloss over the finer details of reality to minimize conflicts while pretending to have a regard for reality. But the super-ego is constantly watching every one of the ego's moves and punishes it with feelings of guilt, anxiety, and inferiority. To overcome this the ego employs defense mechanisms.The defense mechanisms are not done so directly or consciously. They lessen the tension by covering up our impulses that are threatening.
Denial, displacement, intellectualisation, fantasy, compensation, projection, rationalisation, reaction formation, regression, repression and sublimation were the defense mechanisms Freud identified. However, his daughter Anna Freud clarified and identified the concepts of undoing, suppression, dissociation, idealisation, identification, introjection, inversion, somatisation, splitting and substitution.

# Super-ego
The Super-ego aims for perfection.It comprises that organized part of the personality structure, mainly but not entirely unconscious, that includes the individual's ego ideals, spiritual goals, and the psychic agency (commonly called 'conscience') that criticizes and prohibits his or her drives, fantasies, feelings, and actions.
The Super-ego works in contradiction to the id. The Super-ego strives to act in a socially appropriate manner, whereas the id just wants instant self-gratification. The Super-ego controls our sense of right and wrong and guilt. It helps us fit into society by getting us to act in socially acceptable ways.The Super-ego's demands opposes the ids, so the ego has a hard time in reconciling the two. Freud's theory implies that the super-ego is a symbolic internalization of the father figure and cultural regulations. The super-ego tends to stand in opposition to the desires of the id because of their conflicting objectives, and its aggressiveness towards the ego. The super-ego acts as the conscience, maintaining our sense of morality and proscription from taboos. The superego and the ego is the product of two key factors: the state of helplessness of the child and the Oedipus complex. Its formation takes place during the dissolution of the Oedipus complex and is formed by an identification with and internalization of the father figure after Herbert Graf#'Little Hans'|the little boy cannot successfully hold the mother as a love-object out of fear of castration.
The super-ego retains the character of the father, while the more powerful the Oedipus complex was and the more rapidly it succumbed to repression (under the influence of authority, religious teaching, schooling and reading), the stricter will be the domination of the super-ego over the ego later on  in the form of conscience or perhaps of an unconscious sense of guilt (The Ego and the Id, 1923).
In Sigmund Freud's work Civilization and Its Discontents (1930) he also discusses the concept of a "cultural super-ego". The concept of super-ego and the Oedipus complex is subject to criticism for its sexism. Women, who are considered to be already castrated, do not identify with the father, and therefore form a weak super-ego, leaving them susceptible to immorality and sexual identity complications.

# Advantages of the structural model
The partition of the psyche defined in the structural model is one that 'cuts across' the topographical model's partition of 'conscious vs. unconscious'. Its value lies in the increased degree of diversification: although the Id is unconscious by definition, the Ego and the Super-ego are both partly conscious and partly unconscious. What is more, with this new model Freud achieved a more systematic classification of mental disorder than had been available previously:

# Notes
-  Snowden 2006, p. 107.
-  Groddeck, G.W. (1928), "The Book of the It" Nervous and Mental 
Diseases Publishing Company, New York
-  Ego Development and Psychopathology: A Study of Hospitalized Adolescents
Gil G. Noam, Stuart T. Hauser, Sebastiano Santostefano, William Garrison, Alan M. Jacobson, Sally I. Powers and Merrill Mead 
Child Development, Vol. 55, No. 1 (Feb., 1984), pp. 184-194 
Published by: Blackwell Publishing on behalf of the Society for Research in Child Development
-  Psychology Eighth Edition in Modules. David G. Myers.2007 by Worth Publishers. 
-  Snowden 2006, p. 104.
-  Snowden 2006, p. 106.
-  Freud, An Outline of Psycho-analysis (1940)]
-  Ego Development and Psychopathology: A Study of Hospitalized Adolescents
Gil G. Noam, Stuart T. Hauser, Sebastiano Santostefano, William Garrison, Alan M. Jacobson, Sally I. Powers and Merrill Mead 
Child Development, Vol. 55, No. 1 (Feb., 1984), pp. 184-194 
Published by: Blackwell Publishing on behalf of the Society for Research in Child Development
-  Snowden 2006, p. 105.
-  Ego Development and Psychopathology: A Study of Hospitalized Adolescents
Gil G. Noam, Stuart T. Hauser, Sebastiano Santostefano, William Garrison, Alan M. Jacobson, Sally I. Powers and Merrill Mead 
Child Development, Vol. 55, No. 1 (Feb., 1984), pp. 184-194 
Published by: Blackwell Publishing on behalf of the Society for Research in Child Development
-  Snowden 2006, p. 105.
-  Psychology Eighth Edition in Modules. David G. Myers.2007 by Worth Publishers. 
-  Psychology Eighth Edition in Modules. David G. Myers.2007 by Worth Publishers. 
-   Reber 1985, Super-Ego
-  Snowden 2006, p. 106.
-  Psychology Eighth Edition in Modules. David G. Myers.2007 by Worth Publishers. 
-   Sedat 2000, p. 109