Cavities, also called tooth decay or caries, are caused by a combination of factors, including bacteria in your mouth, frequent snacking, sipping sugary drinks and not cleaning your teeth well.
When cavities are permenantly damaged and it starts to form holes in your teeth, then more bacteria goes inside. It is caused when you don't clean your teeth well or eat/drink too much sugary things.