Experience Eggs or Cards are one of a few ways to boost hero level (the other is to compete in the daily Campaign Clash). Increasing a hero's level can increase ATK and HP, as well as increase the number of mercenaries a hero can carry. It is possible to store xp in eggs if you do not have extra hero slots or want to save xp eggs you receive for a new/special hero. Simply consume your xp eggs into another egg to raise the xp eggs level. No experience is lost in this process and many top players use this method to save for new heroes who are released.
There are 5 different types of experience eggs:
Normal (green): grants 20 xp upon consumption.
Good (blue): grants 100 xp upon consumption.
Rare (purple): grants 500 xp upon consumption.
Epic (gold): grants 1500 xp upon consumption.
Coral (red): grants 7500 xp upon consumption.
Eggs can be received through various means:
Daily tasks: Grants Epic eggs. Coral eggs are rewarded for completely daily tasks with an active Hero and/or City Treaty.
Campaign Clash: Can get Rare, Epic, and occasionally Coral eggs.
Raiding: Can get Normal, Good, and Rare eggs (very rarely epic eggs).
Lords League: Can get Normal, Good, Rare, and Epic Eggs.
Dungeons: Can get Normal, Good, Rare, and Epic Eggs.
Battle Royale: Can get all types of eggs.
Guild Clash rewards: Can get all types of eggs.
Treasure Hunt/Daily Dice Roll: Can get Coral Eggs. The game may give you x3 coral eggs if you get the x3 bonus as this is viewed as a lower tier reward.
Purchasing or Spending Jewels: IGG frequently will give Coral eggs or Epic Eggs as rewards for spending or purchasing gems as part of their daily event. They also have a long-term even that can grant a lot of coral eggs as rewards for purchasing tiers of jewels.