Priority

Priority is a system that decides what move goes first. If two moves that have the same priority are used, then the move to go first would be based on the Pokémon's Speed. The highest priority is +5, while the lowest priority is -7.

To better understand this, look at the chart below. Moves to the right of a priority go after moves with that priority.