Pitcher plants of the Napenthes genus are quite incredible. They have adapted over millions of years to survive in the rainforests of Borneo, which are rather inhospitable despite the number of plants and animals that live there. Lack of nutrients, including nitrogen - which plants use to make proteins and grow - is a massively limiting factor to any species. Pitcher plants do not get enough nitrogen from the soil, therefore they have a back-up plan - leaves that eat animals! There is even one pitcher plant big enough to eat rats, which interestingly has been named after Sir David Attenborough - Napenthes attenboroughii!
The pitcher plant leaves are highly adapted to capture prey. Some have nectar glands below the lip at the top of the trap, which attract insects. The lip itself is highly ridged, which means that when it rains (as is often the case in the rainforest) the surface becomes incredibly slippery, almost like an ice-rink to you or I. Insects then slip and fall into a sticky solution inside the trap, which is made from rainwater and a host of chemicals that the plant secretes in order to digest their prey. Some of these chemicals give the water inside the trap a quality known as vasoelasticity, which is a complicated word for the effect quicksand (or custard) has. The more things move in there, the more they get stuck - so insects (or indeed rats) get tired and drown. The plant then uses enzymes, much like we do in our stomachs, to digest their prey and take up valuable nutrients, mainly nitrogen.