Taking things back to basics, earplugs are simple devices which serve one purpose; to attenuate or restrict the volume of a sound source that reaches our ear drums. The inner workings of our ears are pretty robust but can, over time, be damaged if they're constantly subjected to loud noises. Earplugs work by forming a protective barrier so when the sound reaches our ear drum, it's reduced to a level which is deemed much safer.
Earplugs come in a variety of shapes and sizes, offer varying degrees of noise protection, and are made from a variety of different materials and include everything from disposable foam earplugs - which should only be used in a pinch - to custom-moulded earplugs which are unique to the shape of our ears.
I've found that silicone options are common and well regarded as these tend to be reusable unlike their foam counterparts and can also be cleaned. Some higher-end earplug models now come complete with filtering systems which allow us to choose the level of sound attenuation we need for a specific situation.