To unlock a new talent, you need to collect the hero shards that become available after you have unlocked a hero. The more shards you collect, the more talents you can unlock.
Hero shards exist independent of your heroes' levels, and new talents don't unlock as their level increases – they can only be unlocked with shards. When you unlock all the talents for any hero, their shards will automatically be converted into gold.
Shards can be found in tournaments, shadow rifts (time-limited), roulette, marathons, offers in the store, and common chests.