usually a ruler is elected as a normal politician and then declares him/herself supreme dictator or something like that and that's when the tyranny will begin. Another way a tyrant can come into power is if they are in control of the military or a private army. Usually the groups that are disadvantaged are usually killed because they have different spiritual beliefs, stand up to the tyrant or are in contact with known rebels.
Hope this helps!