Cities of refuge were part of the instructions for land that came with Moses’ handing down of the law. It was now, after the invasion of Canaan, that the six cities were named. All were part of the Levites’ inheritance of 48 cities.
20:9 These cities [of refuge] were set apart for all the Israelites as well as the foreigners living among them. Anyone who accidentally killed another person could take refuge in one of these cities. In this way, they could escape being killed in revenge prior to standing trial before the local assembly.
It was a system of justice: it avoided the killer meeting his victim’s avenger before he had a chance to prove it was an accident (or not). But it was no light matter. Even if found not guilty of murder, the killer had to stay in the city of refuge until the High Priest died, still facing the loss of his family, friends and property in his own part of Israel.
And in case there’s any confusion, Numbers 35:9-34 was very clear about the difference between murder and accidental killing. The former involved malice or a plan; the latter was obviously an accident and there was no malice.
The cities were Kedesh, Shechem, Kiriath-arba (that is, Hebron), Bezer, Ramoth, and Golan in Bashan (not the area we now know as the Golan Heights, but not too far away).