Three categories are denial, projection and identification. Although labeled a defense, identification has positive features. The ego identifies with a parent, teacher, leader, coach, or hero. People frequently identify with an authority figure like the boss. They may identify with an entire organization like the US Marine Corps or the legal profession.
Identification is important for learning.
In defending the ego, a person may overidentify. Ego theory maintains that meaningful work helps the personality develop and mature. Learning and work are good as long as the person does not have subconscious conflicts stemming from childhood problems.