Like all flies fruit flies reproduce by laying eggs. Fruit flies will lay their eggs on particularly moist and fermenting foods. Within only about 24 to 30 hours these eggs will hatch into larvae known as maggots. After a week of beginning their lives these maggots will burrow down into the decaying matter they were born in and begin the process of emerging as a fly.
Female fruit flies have a very short lifespan but can lay hundreds of eggs in that very short time. The females actually become sexually active after two days of emerging as adults. They mate with males and begin laying eggs immediately. It is quite easy for a population of fruit flies to multiply by the masses.