Lizards need food, warmth, air and water to survive. There are currently more than 4,675 known lizard species, so it is important to consider the type of lizard you are caring for in determining its specific needs.
Many lizards are herbivores, such as the green iguana, and so will need a diet of leaves, greens, flowers and fruit. Others, such as geckos, are insectivores which need a diet of crickets, mealworms and maxworms. Some lizards, like the monitor kind, are also carnivores that eat insects, spiders, snails and other small animals. There are also omnivore lizards that eat all of these foods.
All lizards are cold-blooded, which means that below a certain temperature, their bodies stop metabolizing food and pumping blood and eventually die. Above a certain temperature, those same processes become so rapid that the lizard can die as well. Every lizard needs access to a heat-producing lamp but also has its own ideal temperature range, so it is essential to find that exact range for your lizard.
Lizards should be kept in a closed cage with at least a mesh lid. This keeps them safe but also allows the movement of oxygen throughout the cage. Finally, you should always have water available to the lizard for bathing and drinking. With these components and a lot of general attention and care, a lizard can survive for years as a pet.