Heat or cold sensitivity to a teeth can be from a variety of possibilities. Heat sensitivity is usually one of two things, either a deep cavity that may be close to the nerve or a nerve that is in the later stages of dying meaning that a cavity has infected the nerve inside the tooth. It can also be from other injuries to a tooth like trauma that can cause the nerve to die. This would typically be treated by a root canal (removing the infected nerve tissue from the inside of the roots) or extraction of the tooth that is no longer savable.
If a cavity is deep it may result in hot or cold sensitivity and would usually be treated with some form of restoration such as a filling or a crown. Typically insulating type layers are placed under the filling to minimize and hopefully stop the progression of the decay as well as to decrease the sensitivity.
Cold sensitivity can be from either of the above options or from gum recession where some of the root structure gets exposed to the oral cavity. The root does not have an enamel covering like the crown portion of the tooth. This make it more sensitive to cold and sweets. Trauma, bruxing (grinding), or hitting harder on a tooth can also cause cold sensitivity around the roots of our teeth we have a soft tissue membrane (periodontal ligament) that acts as a shock absorber between the tooth and the bone of your jaw. If you put too much pressure on a tooth it can bruise this membrane which can then swell. That displaces the tooth out of the socket that then can cause you to hit there first and it keeps increasing the inflammation in the membrane and thus hitting harder and harder. This is usually treated by relieving the bite pressure and using over the counter anti-inflammatories such as ibuprofen or others.
Your tooth has separate fibers that conduct hot and cold. The cold fibers (about 80% of the total fibers) are thinner and these are easier to irritate so typically cold sensitivity proceeds heat sensitivity. The heat fibers are thicker and harder to kill. Once both fibers die off you can set up and infection as the dead tissue can start forming an abscess. This created an infection in the bone around the tooth. Again this is treated by a root canal or removal of the tooth. During growth and development, a child’s bite changes as teeth are being lost and permanent teeth are coming in. This can change forces placed on teeth and can bruise that tissue around the tooth (periodontal ligament) and cause cold sensitivity or just bite pressure sensitivity