There are three categories of talents based on their rarity, common, rare and epic. The stats that can be modified using talents are attack, block effectiveness, chance to armor-pierce on basic attacks (armor-pierce), critical attack chance (CAC), critical attack damage (CAD), defense, health, hero XP, lethal attack chance (LAC), resistance to critical hits, stuns and DoT (Resist). A single talent will modify exactly one stat only except for Resist, which will modify more than one.
The only way to modify talents is purchase and re-roll. You can re-roll for a new talent if you want a different stat modified or a higher degree of modification for the same stat. Re-rolling is free once per day per hero. Afterwards, for every re-roll it costs 5,000 credits, 7,500 credits and 10,000 credits for silver, gold and legendary heroes respectively. When you do, a new talent will be offered and you are given the choice to accept the new talent or retain the old talent. It is possible to get the same talent after re-rolling.