From the University of Waikato, New Zealand is this helpful article on the how & why Neem products function.

Neem protects itself from the multitude of pests with a multitude of pesticidal ingredients. Its main chemical broadside is a mixture of 3 or 4 related compounds, and it backs these up with 20 or so others that are minor but nonetheless active in one way or another. In the main, these compounds belong to a general class of natural products called "triterpenes"; more specifically, "limonoids."


So far, at least nine neem limonoids have demonstrated an ability to block insect growth, affecting a range of species that includes some of the most deadly pests of agriculture and human health. New limonoids are still being discovered in neem, but Azadirachtin, Salannin, Meliantriol and Nimbin are the best known and, for now at least, seem to be the most significant.