Who were the 'Avim', and why must the Torah say that the Kaftorim conquered them and took over their land?
Rashi: The 'Avim' were a branch of the P'lishtim, 1 whose land Yisrael could not take due to Avraham's Bris with Avimelech. So Hashem sent the Kaftorim to take it, enabling Yisrael to capture it from them. 2
Ramban #1: The Avim were Cana'anim whose land was promised to Avraham. It is part of Eretz Yisrael - that we are commanded to conquer, even though the Kaftorim, who were B'nei Mitzrayim 3 conquered them and took over their land.
Ramban #2: The Avim were Chivim, one of the seven nations of Cana'an. Eisav took part of their land, and the Kaftorim took the rest. Yisrael may take only the part that the Kaftorim took. 4
Ramban #3 (citing Midrash Rabah): They were actually Refa'im. 5 Mo'av, Eisav and Amon all took parts of Eretz Refa'im, which Yisrael may not take from them; whereas what the Kaftorim took is permitted to Yisrael.
Ramban #4 (on Pasuk 23, citing Chulin, 60b): The Avim came from Teiman 6 (Yemen) and were so-called, either because took away their land, or because they desired 7 many gods, or because whoever saw them suffered convulsions ('Ochzaso Avis').
Seforno: The Avim were part of the Plishtim, or of B'nei Eisav, and their land was forbidden to Yisrael due to Hashem's word, or Avraham's Bris. Now that the Kaftorim took ir, it became permitted to Yisrael.
What happened to the Avim afterwards?
Why does it say that the Avim lived in Chatzerim?
Da'as Zekenim, Hadar Zekenim, Rosh: They were mighty, and felt no need to live in walled cities.