Some aromatic plants can keep insects and other organisms away from plants you wish to protect.
Plant aroma can form a protective fragrant barrier
May organisms find the plants they wish to eat based on fragrance. Many have a powerful sense of smell the sniff out the most delicious plants. Unfortunately, a lot of the time, we don't want those particular plants eaten.
To disrupt the ability of bugs to find our plants via smell, we can plant disruptors that have aromatic fragrances that will outcompete those of other plants, thus protecting them from critters.
Examples of barrier bringers
Some spectacular disruptors include thyme, wormwood, and peppermint. Basil and dill also have a special place in the garden when you want to keep many of the pests away. Below is a non-comprehensive list of some plants and the pests they manage to keep away.
Rosemary and fennel can keep away snails
Cilantro, oregano, and cumin can deter spider mites
Tansy, cilantro, and catnip are good for keeping potato beetles away
Marigolds and rosemary can keep many beetles away
use peppermint, cilantro, basil, eucalyptus, tansy, and fennel to keep aphids away
As a bonus, many of the oils in these plants can also protect against diseases from fungi, bacteria, and viruses.
The best way to protect your plants is to keep them healthy
These plants can help to keep the bugs away, but the most effective way to keep plants healthy is to make sure they are healthy before there is an issue. A healthy plant is often the best defense against and ifestation.