The pasuk teaches that a man who kills someone accidentally is forced to run to an עיר מקלט, a city of refuge, and he must remain there until either he or the Kohen Gadol die. A close family member of the dead man is appointed to chase the murderer, and if he catches up to him before he arrives at the עיר מקלט, is fully permitted to avenge his dead relative and kill his murderer. Gemara in Sanhedrin 45b adds that if no family member will set out to avenge the dead man, then the Beis Din themselves must appoint someone.
The Steipler Gaon explains that the purpose of the murderer fleeing to the עיר מקלט is two-fold – it saves and punishes at the same time. It saves the murderer from being murdered by the person who has set out to avenge his family member, but even in a situation where for some reason the avenger would definitely not kill him, he must still go to the עיר מקלט anyway. He needs to stay there until he dies, and is buried in the עיר מקלט – the avenger can’t kill him one he’s dead, but he still has this punishment there.
The city he runs to is meant to rehabilitate him – he runs to a city of the Levi’im – the teachers of Bnei Yisrael. The reason there needs to be an avenger appointed by the Beis Din is that we must always be responsible and accountable for our actions – this man cannot get away with it, and the Torah teaches us that he cannot bribe his way out – he stays until the end. There must always be justice in the world.
Hashem runs the world on mercy and strict judgment – with the two there is Creation, and there is justice in the world.