Same-type attack bonus, abbreviated to STAB, grants a 50% boost to the power of an attack that matches one of the types of the Pokémon that uses it. The result of this is a 50% increase in damage (this becomes 100% if the Pokémon has Adaptability).
Examples of STAB in action
A Smore using Leech Life increases the power of the move from 20 to 30, since both are Bug-type. Smore using Ember however, does not get the 50% special attack bonus, since it is not a Fire-type Pokémon.
Variable power moves
Variable type moves
A Pokémon only receives STAB on the current type of the move, not its listed type. For example, if the user's type matches their Hidden Power type, they do receive same-type attack bonus; however, since a Normal-type Hidden Power is not possible, a pure Normal-type, or a pure Fairy-type Pokémon cannot receive STAB for Hidden Power.