Wa alaikum as salam warahmatu allah wabarakato,
17:33. And do not kill anyone which Allâh has forbidden, except for a just cause. And whoever is killed (intentionally with hostility and oppression and not by mistake), We have given his heir the authority [(to demand Qisâs, Law of Equality in punishment or to forgive, or to take Diya (blood money)]. But let him not exceed limits in the matter of taking life (i.e he should not kill except the killer only). Verily, he is helped (by the Islâmic law).
A just cause would be the execution of a legal sentence or in a just war (see 2:190) or in a legitimate self-defense. The authority given to the heirs, 'qisas', refers to the legal punishment for homicide (see 2:178). These days, you'll find that the retribution is carried out by courts (via death sentence) rather than individuals.
Insha'allah this helps.
Salam