In a case of extreme tooth decay, the tasks are to:
(1) Analyze the extent of collateral damage, i.e., how much has the bacterium or the infection spread into surrounding tissue (such as the bone)? This is typically done via X-ray and direct inspection.
(2) Clean the area
(3) Anesthetize the area. This is typically accomplished with a number of injections of local anesthesia in and around the site of the tooth.
(4) Excise the tooth. This can include removing roots individually if the upper structure of the tooth has been compromised.
(5) Excise any other affected tissue.
(6) Control bleeding as necessary. This can involve packing the site in acute cases.
Post-procedural symptoms can include aching sensations at the site, but frequently (very often) very little discomfort is experienced after the anesthesia has worn off, usually for not more than 48 hours. Ibuprofen is an excellent anti-inflammatory drug that will hasten the healing process.
The fact that you're experiencing discomfort right now indicates inflammation of the nerve associated with that tooth, and it may be necessary to also disable the nerve. This can result in residual discomfort at the site after the procedure, usually for not more than 48 hours.
I'm not an expert, but I did stay at a Holiday Inn Express last night!
Just kidding! I had a little training in things medical many years ago.