Tonsil stones are caused by food particles, bacteria, and mucus getting trapped in small pockets on your tonsils. The particles and bacteria can get trapped due to improper oral hygiene or the structure of one's tonsils. When this trapped material builds up, it can cause swelling and soreness.