The term ego is too elaborate to be described in one go. To complicate things further, it can have different connotations when used in different contexts.

The tendency to hurt a person who cares for us is again very vague. If you could explain a little what exactly you are looking for, perhaps I shall answer more specifically.