You should look at some of the posts and videos by joeqsmith on this subject. You will find very in-depth information on the subject.
Very briefly, and grossly oversimplified, the input is protected by series resistors and PTCs to limit the fault current, and then whatever voltage does appear on the other side of the resistors is clamped to limit the maximum voltage that can be presented to sensitive components downstream.