In any given habitat, herbivores forage for plants and carnivores forage for other animals to eat them.
To get food successfully, an animal has to adapt to the surroundings.
Animals that live in a forest have different ways of finding food when compared to an animal that lives in a desert. Animals have adapted themselves according to how much and what kind of food is available.
Look at the tall giraffes; their long necks help them to reach the leaves of very tall trees.
Elephants use their trunks to tear the fruits and branches of the trees or pick up whole sugarcane from the ground. They use the trunks to drink water.
The Reindeer, which lives in very cold areas, have a very sensitive nose, which can smell the grass and small plants covered by snow.
Herbivores eat by grazing on plants or plucking the plant parts. Carnivores and insectivores have to hunt for their food.
Animals like a cat, tiger, wolf, birds all have first to spot their prey and capture them. For this purpose, they often have to chase their prey. Cheetahs are the fastest animals on land, but they have to be fit if they have to chase and capture antelopes and gazelles which are also very fast.
But not all carnivores chase their prey. Some lie quiet and still and capture their prey. For example, look at a frog. It stays in one spot and is very still, and when an insect flies near it, it quickly grabs it by its long sticky tongue.