Kindly get the root canal treatment
done of the tooth having pain
followed by a crown or cap. Till then you can take a pain killer like tab ketorol dt 2 tablets dissolved in water. Also get the cavity filled before it becomes deep and painful. Brush your teeth twice daily using correct brushing technique to maintain your oral hygiene.