Why do teeth hurt after fillings sometimes? Often, the reason is a simple high spot in the restoration that makes the tooth feel larger than the adjacent teeth. This is very easy for the dentist to fix after the numbness subsides, as on the next day. Minor cold sensitivity is normal and will usually subside within a few weeks.
Other possibilities besides a high spot include:
Incorrect use of the bonding materials in a tooth colored or composite restoration. An air space left under a filling. Stress in the tooth caused by shrinkage from the filling material due to building a tooth colored filling without using a layering technique, or making layers that are too thick. Poorly set tooth colored composite material. Leaving decay under the composite (this is an uncommon, but possible cause.) Pulpal irritation caused by heat or chemical assault due to material or technique. Irreversible pulpitis or death of the pulp or nerve of the tooth (sort of goes along with some of the above, but it should be spelled out.) Coincident sinus infection or muscle / jaw pain. Pain in an adjacent tooth that feels as if it comes from the newly treated tooth.
It is important for the dentist to rule out all of these possibilities. Most dentists will begin by searching for a high spot with articulating paper (carbon paper as in "tap tap tap, grind, now open". If that doesn't help, they will move on to other possibilities.