Most car, motorcycle, and bicycle brakes squeal at one time or another
because they involve stick-slip friction whose frequency is supposed
to be out of audible range. Squeal is not only annoying, it decreases
brake efficiency, especially in the lower frequencies where the length
of slip motion exceeds that of stick.

Brake noise requires elastic motion (vibration) at the sliding
interface, with at least one element in rapid stop-start motion.
Because bicycles use hand power and demand light weight, they use
relatively flimsy mechanisms and demand pads with a high coefficient
of friction. The brake material must be soft and pliable enough to
achieve good contact on relatively rough rims. The brakes generally
have a mechanical advantage between 4:1 and 6:1 from hand to rim, as
described under "Brakes from Skid Pads to V-brakes." That's not much
compared to motorcycles that have hydraulic disc brakes with
practically no pad clearance. For a hand brake, free travel (pad
clearance) and flexibility define the limit of mechanical advantage.

Soft brake pads and lightweight (flexible) calipers promote squeal
and chatter, chatter being the mechanically more detrimental version
of stick-slip behavior. Brake chatter is caused by gummy residue on
the rim together with excessively flexible (skimpy dimensioned) brake
mechanism. Rims can be cleaned but flexible brakes can only be fixed
by using better brakes. If the rim becomes gummy again after
cleaning, then either the rims are being contaminated by something
like riding through tar weed or the pads are no good. My solution for
pad quality is Kool-Stop salmon red pads.

Squealing brakes, the more common problem, involves mainly brake pads
that generate caterpillar-like surface waves. The common advice is to
bend the brake caliper to make the trailing edge of the pad (with
respect to rim motion, the forward end of the front brake pad) contact
first. This is not entirely without merit because toe-in is the
natural state of a used, non squealing brake. Elasticity of the
caliper, however small, allows the pad to follow the rim and rotate
forward about the caliper arm, wearing the heel of the pad more than
the toe, causing toe-in. Toe-in is preferred because a pad that makes
full contact as it first touches the rim will rotate slightly from
frictional drag, reducing contact...and drag, which allows it to snap
back and repeat the action. This causes surface waves in the pad,
especially when it is new and thick. For this reason, some pads are
made with thin friction material to reduce elasticity.

If the pad contacts the rim trailing-end first, it develops full
contact stably as pressure and frictional drag increase. However, the
brake may squeal anyway. This can occur with new rims or one with wax
or oil, or from other contaminants like riding across a moist lawn.
New pads often have a glossy, sticky skin that should be removed by either
sandpaper or use. Many types of rim contaminants that increase
stiction (stick-slip) can be removed easily by abrasive scrubbing.
This can be done by braking at moderate speed with a dusting of
household cleanser on a moist rim, followed by a water bottle squirt
rinse (also while braking). This process is more conveniently
achieved by slowly riding through a long mud puddle while braking or
by descending a mountain road in the rain where there is usually
plenty of fine grit and where rain supplies the rinse.

Some rims have machined brake surfaces with fine grooves whose
roughness reduces squeal tendencies so they don't have to be "broken
in". Martano rims of old had somewhat larger grooves as part of the
extrusion for this purpose.

Avoid bending brake calipers. This is "cold setting" in its worst
form. Aluminum in such cross sections doesn't bend far without
structural damage. Besides, this remedy could lead to more bending
with each occurrence of squeal, and that is better abated by other means.