A dental abscess occurs when pus (a mixture of dead cells and immune cells) accumulates in a specific pocket near the tooth's root.