A nut is a plant consisting of a hard or tough nutshell protecting a kernel which is usually edible.
In general usage and in a culinary sense, a wide variety of dry seeds are called nuts, but in a botanical context “nut” implies that the shell does not open to release the seed.
In botany terms, nuts are strictly a particular kind of dry fruit that has a single seed, a hard shell, and a protective husk.
Chestnuts, hazelnuts, pecans and walnuts fit the true definition of a nut. Peanuts and almonds do not meet the botanical definition of a true nut.