Herbs come from the leaves of a plant, spices are from any other part of a plant (and salt is a mineral).
In cooking they are frequently used together to flavor a meal, and their names get used interchangeably, but herbs and spices are not the same. In short:
Herbs are a seasoning that are the leaves of a plant
Spices are a seasoning from any part of a plant other than the leaves (roots, stalks, bark, seeds, and sometimes even the fruit)
In greater detail, an herb typically comes from smaller deciduous plants without a bark stem. There are exceptions of course as lavender, sage, rosemary aren’t deciduous and never lose their leaves. Either way, the key is that the green leaves become herbs when they are used in cooking, medicine, teas, cosmetics, etc.
Spices can come from everything but the leaves of a plant. For example cinnamon comes from bark, ginger comes from roots, pepper comes from seeds, and chili powder comes from the pulverized fruit of the chili pepper. Saffron, one of the most expensive spices in the world at around $10,000 a pound, comes from the hand-picked stigma & styles from the Crocus sativus flower.
Allspice, despite a misconception, is not a blend of spices but is just one spice which comes from the berry of the Pimenta dioica tree. Its name comes from the fact that it tastes like a combination of cinnamon, nutmeg, and clove.
Herb & Spice Plants
There are a few plants that produce both an herb and a spice. The leaves of the Coriandrum sativum produce the herb cilantro while the seeds become coriander. Similarly the Dill plant produces dill the herb from its leaves, and dill the spice from its seeds.
The food seasoning odd-one-out, salt is a mineral and does not come from a plant (although salt is present in plants). There is a lot to say about salt but in short it’s been used as a preservative and a seasoning for thousands of years. It’s the only food seasoning that doesn’t come from a plant.