The term ego originated in Freudian psychology as the conscious, executive or managerial function of the mind; but also has the more general meanings of one's personality or sense of self. The ego therefore includes a person's opinion of himself, which could include a high or low sense of self-esteem. A person with a "big ego" may have an inflated opinion of herself, in comparison to her actual accomplishments. With its managerial function, the ego is concerned with self-preservation.
The sun in astrology symbolizes the ego, although the sun has additional potential meanings in a horoscope.