Needing expert help. I have pain on the two teeth that they grinded down. Mainly cold and heat sensitivity. Why is this and how can a dentist fix this?

Hot and Cold. If the sensitivity lasts less than ten seconds with no residual dull ache or throbbing then it will get better with time however see your dentist to be sure. If the sensitivity lasts longer than ten seconds or you get a dull throbby ache that lasts a while then it can be fixed via root canal therapy.
Tooth sensitivity. We need more information. Were they 'ground down' for fillings? Crowns? Bite adjustment? When were they treated? Today? A few days ago? One month ago? Is it getting better, worse or the same over time? The answers determine the remedy, if any. It's not uncommon to have some temporary sensitivity following treatment. Call your dentist and ask your questions.