There are many factors that come into play when a cavity is created. First, for a tooth to be affected by decay, the bacteria must attach themselves to the tooth. They combine with proteins in your saliva and food remains, creating a layer which is also known as plaque. Plaque then acts as a glue that sticks to your teeth and coats them with these bacteria.
Now, in order for bacteria to thrive, they must eat. Their most favorite foods are salty foods and sugary foods. They love anything that is easy to digest and they often digest it is in as little as 15 minutes. With that being said, junk food is not only bad for your body and health, it is also just as bad for your teeth.