They now the distance to the break from one end. They then use that with a map of the cable to determine the lat and long of the break and send a ship to fix it.
This process assumes the damage is accidental and doesn't involve the military. If Russia keeps cutting optic cables that could change. I can envision military ships getting real-time notification of fiber cuts and the current location of all foreign ships.