Call your dentist
Is this a new filling? Was it recently placed? Does it happen when you eat or drink? Is it spontaneous? Does it happen when you drink hot or cold? These are all questions that need to be answered to determine what is causing your pain.
Call your dentist to have this examined.