Through their skin. If the pond remains very frozen for a long time with no breaks in the ice then methane can build up in the water due to rotting vegetation and this can finish them off. In small ponds in gardens it's a good idea to make a hole in the ice with a pan of hot water to allow the methane to be released into the air.