I’ve got a clogged sink, and have been reading the labels on a bunch of different products lately. I’d always assumed that they were a strong acid of sorts, which would dissolve whatever sort of material was built up in the pipes. But I’ve noticed that a lot of these products specify that they’re non-corrosive, so I’m not sure what other sort of mechanism may be at play here.
Many of them contain lye, which is alkaline. Always read the label to check for compatibility with your pipes. Note that drain pipes can be made from a different material than your supply pipes. PVC and ABS are common, but there are other kinds.