How does Promotions actually work?

While playing i’ve noticed that in the fast selection mode, one promoted unit counts as a diferent group as other units of the same type but with another promotion level. So. How does it works? Does fragging an enemy unit transform your unit into a similar unit but with better stats? Can you change the necesary enemies for promoting? Can player techs or cards change how promoting works?