A cavity can also expose a nerve inside the tooth.