They are a simple mechanical mechanism that many (not all) manufacturers build into the brake pad. When squealers are present, they are meant as an audible early warning system to alert you of worn out brake pads or shoes before the situation turns into a metal-to-metal contact scenario.
How does a brake pad squealer work?
Electronic brake pad wear sensors replace the traditional metal squealer tabs found more commonly in braking systems. These tabs work by rubbing against the rotor once the pads have reached the end of their service life. By making a loud squeal, it lets the driver know that the brakes are up for a service.
Do brake squealers go up or down?
You generally want them to be on the side of the pad that the wheel rotates "into" them if that makes sense (trailing edge basically), so they won't get pulled off as some just clip on the edge of the pad...