Talents are an additional bonus that weapons can drop with.
Most weapons drop with 3 talents, but some can drop with as many as 5 or as few as 0.
Melees in particular are weighted towards 0 talents, but can drop with as many as their rarity allows (up to 3 at cosmic/ascended, up to 2 at highend etc).
Most talents are set into one specific slot, but others are more flexible.
Some talents are Global talents; ie they can appear on a normal gun when it drops or is talent mutated.
Others are Non-Global, and to obtain them on a gun, it must be a specific prefix or unique that will roll that talent.
One example of a non-global talent is Quicksilver. It will not roll in T2 or T3 of any gun, except for T2 on Mutant (Ascended prefix) or T3 on Quicksilver (Cosmic prefix).
The lists below are where talents USUALLY go. Some talents appear in multiple slots (like Quicksilver above) and will be listed in both.
Global talents are the the talents that can be rolled by most guns, and rerolled using consumables.
Unique talents can only be found on unique guns or specific prefixes. They cannot be obtained on regular guns.
You can prestige a gun at level 100 (Or 142 for specific collections)
When you prestige a gun it gets an additional talent based on the guns collection, the gun drops to level 1 and becomes untradable