Nectar is also a fruit drink that gardeners use for refreshment themselves after a good workout in the yard. It comes in different flavors, such as peach nectar, apricot nectar, and other yummy varieties.
Nectar can be produced most commonly by flowers, in some structures like glandular discs, hairs, etc. In this case, animals will go for the flower, and evetually will promote pollination by touching its sexual organs, and so, nectar is used for a reproduction purpose. But some plants produce nectar elsewhere, and this sugary substance assumes different functions in different species.
In some species of Impatiens, there are several nectariferous glands all over the plant, specially on the petioles. Ants are atracted by these glands, and will do anything to protect these plants against herbivores.
Passion vines have 1 or more pairs of nectariferous glands on the leaves and petioles. Some do the same strategy as Impatiens, described above. But in some species, the glands are reduced and do not produce anything, but ressembles butteflies eggs. Butterflies will think another butterfly placed their eggs in that plant, and will avoid it, so the plant keeps itself safe from catterpillars.
Euphorbias have a huge nectariferous gland positioned by the inflorescence (see "cyathium"). All those glands, despite the fact the they are not in the flowers, are responsible for producing nectar. In this case, the nectar produced outside the flower assume the same function of atracting pollinators (bees) as the floral nectar.
There´s a very special case of floral nectar in a few species of Combretum. The nectar is exceptionally gelatinous. The jelly "pills" are sweet, and parakeets feed of it.