The answer to this question can be found by looking at the structure of teeth. Teeth are composed of an outer layer (enamel) that is tough and resistant to decay, followed by a softer layer (dentin) that contains the nerve. When something breaks through the enamel surface and exposes dentin, it can cause irritation or toothache because the nerve is directly exposed.