Bamidbar / Numbers 35:11
וְהִקְרִיתֶם לָכֶם עָרִים עָרֵי מִקְלָט תִּהְיֶינָה לָכֶם וְנָס שָׁמָּה רֹצֵחַ מַכֵּה־נֶפֶשׁ בִּשְׁגָגָה׃
you shall appoint for yourselves cities to be cities of refuge for you, and the manslayer who kills a person by mistake shall flee there.
Pshat פְּשָׁט
Cities ready for a wall
Rashi: this verb means "to prepare, to appoint," as in "because the Eternal your Almighty prepared it for me." Malbim: Ibn Ezra derives it from the word "town" (קִרְיָה, a walled town), but then they would be called fortresses and not cities of refuge. So a wall is not required in fact, but the cities of refuge must be ready for a wall: not small villages, but cities that could be walled if people wished.
How Rashi and Malbim explain it
Remez רֶמֶז
Five refuges for the soul
Kitzur Ba'al HaTurim: in the section on the cities of refuge the word "refuge" is written five times, so that the refuge receives and the soul, which has five names, is not killed. Rabbeinu Bahya: one who kills by mistake is punished with exile and not with death, because his heart did not agree to the killing. This law shows that the heart is the main thing in a person and in all commandments and transgressions: a commandment done without intent for the sake of Heaven brings no reward.
How Kitzur Ba'al HaTurim and Rabbeinu Bahya explain it
Drash דְּרָשׁ
Exile from the garden
Midrash Tanchuma: Adam was told "on the day you eat of it you shall die," but the Eternal had mercy on him and drove him out of the garden, as the one who kills by mistake is sent to a city of refuge. Moshe (Moses) asked how the manslayer would know the way, and the Eternal told him to set up signposts on the roads. If for killers He made a road to safety, how much more for the righteous.
How Midrash Tanchuma explain it
Sod סוֹד
The place of one who has no place
Sefat Emet in the name of his grandfather: the Eternal gives a city of refuge to one who knows he has no place, because such a grave sin happened to him. That very knowing gives him a place: the Eternal gives a place to one who has none. A person's main place is knowing that he has no place. Ba'al Shem Tov: the three cities of refuge are thought, speech and deed. A person must flee from the avenger of blood, the evil inclination, by strengthening himself in holy thoughts, words and good deeds, even if they are not yet fully pure.
How Sefat Emet and Ba'al Shem Tov explain it