Most likely a cavity. It seems that you have a cavity. Any damage to the tooth that exposes the interior of the tooth is going to result in the type of pain you have. Even though you can have a cavity and not experience symptoms till later. Possible gum disease exposing the roots or too much pressure on a tooth can also cause pain. Need an examination with xrays for possible hidden issues.
Pulpitis. This symptom is "pathognemonic"-- i.e., highly characteristic of-- an acute pulpitis, or inflammation of the dental pulp. Pulpitis is most commonly the result of deep tooth decay, but may also result from physical injury or careless drilling of a tooth by a dentist. Treatment of pulpitis entails either root canal therapy or removal of the tooth, depending on circumstances.