*Villa* meant "country house" or "farmhouse" and was often used to refer to a small community of people living together in a rural area.
Over time, the word evolved to refer to a small settlement that is smaller than a town but larger than a hamlet.