Generally, the ego is thought of as a person's self-esteem, their idea or opinion of themselves - but this is not the actual meaning of the word.
The summary definition of the word ego, derived from the Oxford English Dictionary, the highest authority on the English language, is as follows:
Ego is our 'sense of self'.
Ego is the aspect of self we are consciously aware of and which interacts between the external world and our unconscious mind.
The origin of the word ego is from the Latin, meaning ‘I’.
When we use ‘I’, we are pointing at our self - but we do not realise that we cannot know the totality of our self because the content and functioning of our mind is mostly beyond our conscious awareness in the unconscious.
This is why we only ever know our ‘sense of self’ not the totality of our self.
To understand this further one must also know what 'self' actually is...