Nut is both a botanical classification and a culinary classification of plant parts.
Botanically, a seed is the part of the plant responsible for reproduction. They are fertilized ovules that eventually get planted and become new plants if everything goes well for the seed.
To help seeds spread, many plants are designed to encase the seeds with fruit. This motivates animals to eat the fruit and seeds both. Since seeds are almost protected by a seed coat, the seeds pass unharmed through the digestive system and spread to new places when it leaves the other end.
Seeds typically are not all that tasty since they aren't designed to be eaten, just the fruit around them. However, since they must contain energy and nutrients for the new plant, some seeds can be delicious and nutritious.
Culinarily, seeds are neither fruits nor vegetables. They are their own category, although sometimes what is botanically a seed would be considered a nut to us.
In addition, often what we would consider a seed is actually a whole fruit botanically. This is the case with many dry fruits where the fruit wall and seed husk fuse into one or where they are otherwise attached.