Teeth are often sensitive because the enamel (the protective layer of the tooth) has worn away and exposed tiny nerve endings on the inside of your tooth. Any stimulation whether it be hot coffee or cold ice cream irritates the nerves and results in sharp pain. Worn enamel can be caused by a number of things ranging from tooth decay and improper fillings to somethings as simple as brushing too hard, grinding your teeth and even consuming too many acidic foods and beverages.
Your dentist can make recommendations on how to go about alleviating pain from sensitive teeth. Depending on the cause they will take several different approaches. They might recommend fluoride treatments or increasing the amount of fluoride in your diet as fluoride helps to strengthen the enamel on your teeth. Another approach would be to use toothpaste specially formulated for sensitive teeth that is meant to desensitize the nerves and lessen the amount of pain you experience. If the pain is caused from grinding your teeth your dentist may recommend the use of a mouth guard at night to protect the enamel on your teeth.
Whatever the cause, identifying it begins with a diagnosis from your dentist. Pain from sensitive teeth is something that your dentist is well equipped to treat.