As mentioned, plaque is a harmful substance that is an enemy of your teeth. Plaque left on your teeth is the leading cause of cavities. A cavity is decay, and decay eats tooth structure.
When you have a cavity on a tooth, it will spread if left untreated. If left for too long, it can literally consume an entire tooth.
If you want to prevent cavities, you'll have to find a way to eliminate the plaque you have on your teeth. You can do this by properly brushing your teeth a couple of times each day, but even this is not always enough.
Plaque can hide in your mouth. It can hide in between your teeth or on your tongue. It can find its way into areas of your mouth that you have trouble accessing.
The good news is that a dental hygienist can remove all the plaque you have on your teeth, and a hygienist is even able to remove some of the tartar that is present. If you remove the plaque, you won't be able to get cavities.