Treatment depends upon the depth of your cavity, if cavity is not involving pulp then it can be restored by doing simple filling but in case the infection reach to your pulp the root canal treatment is done.
Next Steps
visit dentist, xray is required for proper diagnosis. as you are telling cavity is deep so their might be chance that it require capping also.