O you who have attained certainty/trust/faith! The law of equality has been prescribed for you in dealing with murder. If a free person has committed murder, that free person will face the law. If a servant has committed murder, that servant will face the law. And if a woman has committed murder, that woman will face the law. If the victim's kin pardons the guilty, the murderer must be appreciative and pay an equitable compensation to the kin in handsome gratitude. This pardon is a concession and mercy from your Lord. Whoever, after this, trespasses this law will incur a massive punishment.
This verse talks about the equality of everyone in front of the law, which is advocated by God under his laws. Through this, there will, ideally, be no cases of revenge by the kin of the murdered person. This is how life is being saved. A popular and absurd interpretation of this verse is that it advocates that a woman can only be sentenced to death when she was killed a woman, a servant can only be senteced to death if he/she has killed a servant, etc. However, there are obvious problems with this interpretation, one being that a woman is both a woman and free, so, according to the popular interpretation, she should be senteced to death whether she murders a woman or any other free person, which is ignored in that interpretation.
So basically this verse advocates against the "an eye for an eye" concept. The kin of the murdered person is encouraged to forgive the murderer in return for a recompense. Note that "whoever, after this, trespasses this law will incur a massive punishment", meaning that if you take revenge (going by the "an eye for an eye" principal), will incur a massive punishment.
Peace