What is a Nut?
In Botanical terms, a nut is a hard-shelled fruit, which does not open to release its seed. There are relatively few true nuts because dehiscent fruit (where the shell does split open) is far more common; true nuts include chestnuts, pecans and hazelnuts. Not all nuts are closely related to each other on the family tree of plants though – indehiscence has evolved multiple times as a strategy for seed dispersal.
However, the word nut is used to refer to a huge range of hard fruits and seeds, from legumes (e.g. peanuts) to drupes (e.g. coconuts and cashews).