A nut is classed as a simple dry fruit with one seed (very occasionally two) and a hard shell which grow on trees. Examples of true nuts are chestnuts, hazelnuts, and acorns. However, peanuts, are not classed as nuts, they are actually a type of pea that grows underground.
Along with beans, peas and lentils, peanuts are classed as a legume. Legumes are a type of edible seed that grow inside small pods. The peanut plant flowers above ground but the peanut seeds (the bits we eat) mature underground and grow in small pods.
Other types of nuts that are not actually nuts include Cashews, which are a seed that grows inside the Cashew fruit. They are classed as drupes, which are fleshy fruits with a seed or pit inside, other common drupes include peaches, cherry’s and plums however with these drupes we eat the fleshy fruit and with cashews we eat the hard seed instead. The fleshy part of the cashew plant is actually highly toxic to eat and also causes skin irritation similar to that of the Poison Ivy plant, as such the seeds must be very carefully removed from the fruit. Almonds, Pistachios and Walnuts are also drupes.
Some people can be so severely allergic to peanuts that coming into contact with even a tiny amount can be fatal; but these people may not be allergic to true nuts.