Pyrrolizidine alkaloids (PAs) are heterocyclic secondary metabolites with a typical pyrrolizidine motif predominantly produced by plants as defense chemicals against herbivores. They display a wide structural diversity and occur in a vast number of species with novel structures and occurrences continuously being discovered. These alkaloids exhibit strong hepatotoxic, genotoxic, cytotoxic, tumorigenic, and neurotoxic activities, and thereby pose a serious threat to the health of humans since they are known contaminants of foods including grain, milk, honey, and eggs, as well as plant derived pharmaceuticals and food supplements. Livestock and fodder can be affected due to PA-containing plants on pastures and fields. Despite their importance as toxic contaminants of agricultural products, there is limited knowledge about their biosynthesis. While the intermediates were well defined by feeding experiments, only one enzyme involved in PA biosynthesis has been characterized so far, the homospermidine synthase catalyzing the first committed step in PA biosynthesis. This review gives an overview about structural diversity of PAs, biosynthetic pathways of necine base, and necic acid formation and how PA accumulation is regulated. Furthermore, we discuss their role in plant ecology and their modes of toxicity towards humans and animals. Finally, several examples of PA-producing crop plants are discussed.