They cut the cable in half, and put a new piece in it. They can locate the exact point of failure using an OTDR, as already mentioned in other comments by now.
In one such big under-sea cable, there could be hundreds of individual fibers inside. (It doesn't cost alot more to put another fibre in the big cable, and you get alot more bandwidth to sell).
For each fiber inside the cable they "weld" it to the new piece they are putting between. (I'm sorry, I don't have the correct translation for the word in English). But really, they put the fiber in a machine, together with the fiber of the new cable they are putting in between, and they hit a button: "weld". It creates an arc through the point where the fiber needs to be welded together. After the arcing you heat that spot so the atomic structure can repair a little.
Repeat 500 times and put some extra mechanical protection around to protect your welding, and you're done.
There exists equipment that can do multiple fibers at once, so basically the engineer who's doing it just needs to place both ends of the fibers in the machine, hit the button, remove fiber and repeat for a day or 2.