Hi, 3 years is too young a age , there must be decay / black cavity in the tooth which has gone deep. Take him to a pedodontist.
Next Steps
till u visit make him gargle with lukewarm water with rock salt in it. 4-5 times a day
Health Tips
don't give any heat fermentation/ application