While doing exercise our blood circulation in body increases which is same for the teeth also.
As teeth are closed entity they can not handle increase in blood circulation if they are already infected due to tooth decay
So your first priority must be to visit your general dentist
and have the check up done.
Also plz mention which area in teeth is paining.
Is it happening in localized area or your all teeth are paining?
Are you able to locate the pain in any specific tooth?