Traits are a set of three passive bonuses that can be unlocked for troops. A majority of Traits have something to do with either stats/skills (such as gaining +1 attack for each Blue troop in the team), or status effects (such as being immune to Burning). Each troop has its own set of Traits.
Traits can be unlocked only with Traitstones, of which there are a wide variety. Traitstones can be earned from battles, chests, treasure maps and store purchases. Each Trait takes a specific combination of Traitstones to unlock (increasing in total cost for rarer troops), and each troop's Traits must be unlocked in sequence from the Traits page in the Upgrade menu.
Note that unlocking a Trait on one troop does not unlock it for others - for instance, unlocking the Sturdy Trait on Rhynax does not unlock it for the Chimera or any other troop that can have Sturdy.
Legendary Traits are especially strong unique Traits that are each only found on one legendary (or mythic) troop. As such they are typically a degree or two stronger than normal, but more expensive.