This is a sugary liquid that plants secrete from structures called nectaries. Usually, these nectaries are found inside flowers. The nectar attracts pollinators such as beetles, bees, birds and bats. The animals get a sweet drink, and the plant gets its pollen stuck to the animal. When the animal moves on to the next flower, the pollen goes with it and can later fertilize a plant egg. That allows the plants to reproduce. The nectar serves as a bribe to keep the pollinators coming back.
Some plants also have nectaries that are not in flowers. These nectaries produce sweet nectar, but not for pollination. Instead, the nectar attracts organisms that are predators. Those predators hang around the nectaries for snacks, and they also attack other animals who might try to eat the plant. It’s still a sugary bribe, but this time it’s a bribe for defense.