Fleas generally don't survive past 100 days, even if they live on a host (the animal on which they feed). However, without a host, they have no food source and may die in two to 14 days. The same can't be said for flea eggs and larvae, which do not require a host and can reach high populations.
Once an adult flea is deprived of its host, it will basically starve to death. It will generally die in two to 14 days.
Though a flea itself has a short lifespan, a female flea can produce at least 50 eggs a day, which can remain viable in the environment for several months to several years under the right conditions. That is why fleas can be difficult to get rid of.
Once the eggs hatch, they become flea larvae. Larvae do not need a host for survival--they spend much of their time in a "cocoon" stage, during which they mature into adult fleas.
At any moment, there will be many more flea eggs and larvae than adult fleas. An individual flea's lifespan is minimal, while a flea population could last for years if no steps are taken to remove them.
If your pet is suffering from fleas, take it to the veterinarian and find out what to do about the flea population. At the very least, you will have to isolate your infested pets while washing and vacuuming your entire home.