Lock On is a Normal-type move. The next move made by the user of this move against the target will not miss, even if the target uses a move with a semi-invulnerable turn like Fly. If the target switches out, the effect of Lock-On wears off. Lock-On does not allow the user to bypass protection moves. Lock-On bypasses accuracy checks to always hit, unless the opponent is in the semi-invulnerable turn of a move such as Dig or Fly.
Pokémon that learn Lock On
By leveling up