Warts form when a type of human papillomavirus enters the skin and causes accelerated production of cells in the top layer of the skin, creating a growth.