In the culinary arts, the word herb refers to any green or leafy part of a plant used for seasoning and flavoring a recipe, but not used as the main ingredient.
What exactly does this mean? Here's an example. Spinach is the green part of a plant, but spinach is a vegetable, not an herb because spinach is prepared as a food itself, not merely to add flavoring to another food.
Similarly, a leaf of lettuce is the green part of a plant, but when you make a salad, the lettuce is the main ingredient, so lettuce isn't an herb either.
So what is an herb? Examples of herbs are basil, parsley, rosemary, thyme, and dill. Note that for each of these, we're talking about the green or leafy part of some kind of plant. In the case of basil, the leaves can be quite large, whereas rosemary leaves or more like spines. Still, each is the leafy or green part of the plant and thus an herb.
So what exactly is the difference between an herb and a spice? We already know that an herb is the green part of a plant used for seasoning or flavoring. Anything else would be considered spices — for instance, any dried bark, root, berry, seed, twig, or other plant matter that is used to season or flavor a dish.
For instance, cinnamon is the bark of a tree. Cardamom is a seed pod. Allspice is a dried berry. Cloves are dried flower buds. These are all examples of spices. Note too that spices are used in dried form while herbs can be used either fresh or dried.