Many brake pads have a small metal tab called a wear indicator or squealer. When you hear a steady high-pitched squeal that comes and goes with the pads, this tab is doing its job. Here is what the squealer is and what to do.
What the squealer is
The squealer is a thin spring-steel tab riveted to the pad - see brake pad wear bar. It is set at a height so that when the friction material wears down to a low level, the tab reaches the rotor and starts scraping, making a deliberate warning noise. It is a designed early-warning device.
The sound it makes
A wear-indicator squeal is a constant high-pitched squeak while rolling that often quiets when you press the brake hard (the pad shifts). That is different from a grinding sound; see why brakes squeak. The squealer means "pads are near their limit," not "pads are gone."
Not all pads have one
Some pads use an electronic sensor instead of a mechanical tab - see brake pad wear sensors - which triggers a dashboard light rather than a noise. Either way, the message is the same: measure the pads soon.
What to do
When you hear the squealer, inspect the pads promptly. If they are near minimum, replace them before it turns to metal-on-metal grinding that ruins rotors. Fit quality pads and fresh hardware.