For the technically inclined who want to know: it’s small electronic components called Metal Oxide Varistors, or MOVs for short, which are more often used for this filtering of surges. Other types of filters are gas discharge arrestors which are often seen in antenna protectors, but most of the time, MOVs are used, often in combination with other components like capacitors.
Many surge protectors but not all include a LED indicator to indicate if the AC socket connected to the surge protector has a good earth connection. Please note that the surge arrestor within your surge protector cannot absorb direct lightning strikes. A typical lightning strike can be measured at fifteen million volts, therefore, if you live in an area with frequent lighting, you should buy insurance as well.
Manufacturers of surge protectors certify their devices and measure their effectiveness, giving them a rating in Joules which is the amount of energy they can filter, and also its clamp voltage, which is the threshold. Put simply, the more joules, the better protection and the longer your surge protector will do its job.
Finally, some surge protectors are equipped with fail-to-safe conditions, also known as automatic shutdown technology and "fail to shutdown". When the surge protector experiences a surge and the arrestors reach their end of life, the device stops sending power to your devices, telling you in no uncertain terms that it's time to replace it.