The order of succession is based on equal primogeniture, meaning inheritance by the oldest surviving child without regard to gender. The heir apparent is usually the eldest. However, it would be within the monarch's prerogative (as absolute monarch) to amend the line of succession, include non-family members, or completely exclude royals from the line of succession altogether.
Scar was the younger brother of Mufasa and the former leader of the Lion Guard. In order to gain his right to the throne, he attempted to kill his older brother Mufasa with his Lion Guard, and killed the Guard when they refused to help. He later succeeded in killing Mufasa on his own, but he later died at the claws of his own minions, the hyenas, after being defeated by his nephew Simba.