Paul W. answered 04/06/19
Dedicated to Achieving Student Success in History, Government, Culture
Contrary to what might be said, I'm not and expert on how warships, or any other ships, can be raised, that is, restored to the ability to float.
Nevertheless, it's my understanding that a common method, certainly in use in 1941-42, was to repair the hull, seal the hull, and pump out the water (given the attack was made in December, it's likely that most, if not all, of the ships that needed to be raised were restored in the spring of 1942).
The damage that had allowed enough water to enter the hull of the ship to end its buoyancy was the first thing that had to be addressed. Any holes in the hull caused by bombs or torpedoes had to be repaired. Because such repairs would have to accomplished underwater, these repairs would likely be temporary fixes intended to last long enough to bring the ship to a drydock, where the hull could be restored to an almost new condition.
If a ship has sunk so low in the water that the deck is underwater, then all of the hatchways, air shafts, etc..., anything that could allow water to flow into the hull, would have to be sealed to make the hull watertight.
Once the first two steps described above have been taken, the recovery team can begin pumping the water out of the hull, replacing it with air. When enough of the water has been pumped out of the hull, the ship will begin to recover its buoyancy, bringing it up to the surface to float in the surrounding water. Once afloat, with the rest of the water that had entered the hull pumped out, the damage caused by seawater can be addressed and, as noted above, the ship can be towed to a drydock, where the damage to the hull can be permanently fixed.
An alternate method, which I'm not certain was in used during World War II, is to place one or more large, deflated bladders or balloons inside the hull of a ship. Inflating these serves the dual purpose of pushing the water out of the hull and providing the buoyancy necessary to bring the ship to the surface.