Squealing can be reduced by "toe-in" - making the front part of the brake pad touch first.
Check out Park Tool's instructions on servicing side-pull brakes:
http://www.parktool.com/blog/repair-help/dual-pivot-brake-service
Squealing is the result of a harmonic resonance from a slip-and-stick phenomenon, similar to how a violin bow resonates on a string.
The brake pads grab the rim and are pulled forward by the force of the wheel.
The arms must at sometimes jerk backwards, but if you are still braking, the arms are flexed forward again.
This is repeated again and again many times per second, and this creates the squeal.
Because of this, flexible and less expensive arms tend to squeal more than stiff calipers of better brakes.
It is possible to reduce squeal by having the leading edge of the brake pad strike first.
This tends to reduce the back and forth jerking of the arms.
But before you go trying to toe-in, make sure you're working with parts in good shape: Examine your brake pads .
If they are old and hard, worn deeply, or full of junk, replace them.
Otherwise, use coarse sandpaper to take off the surface to bring out fresh rubber.
You only need to take off a tiny bit.
Clean your rims .
Road grime, bike lubes, and brake material all collect on your rims.
Rubbing alcohol, vinegar, Simple Green, a product marketed as "degreaser" can all work.
Don't let any get on the drivetrain or in the hubs.
Also, you'll need rags.
True your wheels .
There's no point in trying to adjust brakes on a wheel that isn't true (round and dished is good, too).
And you can't true a wheel if the hubs aren't in good shape.
bicycles.stackexchange.com/users/605/Jay Bazuzi
Jay's answer covers most of it and you should start with his suggestions (toe-in and greasy rims
are big culprits).
I'll only add two things: Brake pad type can sometimes make a difference.
Kool-stop "salmon" pads are widely recommended to reduce problematic squeals.
Some bike setups are more prone to squealing, even with clean rims, new salmon pads and perfectly aligned brakes.
It's very unusual
but I had this problem on a previous bike (V-brakes on a carbon fork).
bicycles.stackexchange.com/users/157/darkcanuck
My bike with pull brakes, squeal like crazy...
New pads, clean rims, adjusted well, still squeal.
Roughed up pads, still squeal.
Now I put alittle baby powder on each side of Rim, just a dusting.
I put a little baby power in palm of hand, take finger, dab in powder and rub some on the rim, each side.
Fixed my brakes, stops good and no squeals.
bicycles.stackexchange.com/users/8325/cliff
The above answers cover the critical information, but I'd add that some brakes make "toe in" adjustment easy (offset washers, or other means).
Some brakes require that you bend/twist the arms.
For the latter, I'd recommend your local bike shop mechanic...
if for no other reason that brakes are important safety equipment, and are therefore worth being looked at by a pro.
bicycles.stackexchange.com/users/1031/daniel
Another cause for the noisy brakes is the brake pads not being fully tightened.
In my experience such noise is more commonly seen in cantilever brakes whose mechanism is well explained by Jay Bazuzi's response.
bicycles.stackexchange.com/users/7416/Akshay
Painted wheel rims causes the squealing.
You can try rubbing it down with sandpaper or just wait for it to wear down...
hence why the talc works!
bicycles.stackexchange.com/users/28522/JessieJJ
My rear rim brakes are squeaking loudly. I don't know what the problem is, but I am sure it has nothing to do with rain because it happens all the time even if it is dry.  Anybody have an idea what could be problem and how to solve it? It makes the rear brakes kind of useless, because if I use them I will scare the people or drivers around me.
How do I make my rim brakes stop squealing?
bicycles.stackexchange.com
<brakes><rim-brake>
bicycles.stackexchange.com/questions/2591
bicycles.stackexchange.com/users/967/Promather
When brake pads are squeaking, the first thing to do is check they are not worn out. If they are, they need to be changed. Otherwise, "toe in" procedure,  tightening them or rubbing them down with sandpaper may help. Alternatively, applying powder to the rims, rubbing alcohol, vinegar and Simple Green, a product marketed as "degreaser" can all work. Finally, salmon pads may be the answer to stopping the squeaking. Flexible and inexpensive arms tend to squeal more due to their design. To stabilize the arms and reduce noise, you could make the leading edge of the brake pad touch first. This practice is called "toe-in". Another solution would be to check your break pads for damage or wear and make sure they are tightened. You could also try cleaning your pads with sandpaper. Alternatively, there might be a problem with your rims, especially if they are painted. Consider using a variety of products on your rims, including rubbing alcohol, vinegar, degreaser, sandpaper and baby powder. Finally, it is recommended that you use kool-stop "salmon" pads to reduce squealing, even though certain bike types cannot overcome this issue.
Flexible and inexpensive arms tend to squeal more due to their design. To stabilize the arms and reduce noise, you could make the leading edge of the brake pad touch first. This practice is called "toe-in". A solution would be to check your break pads for damage or wear and make sure they are tightened. You could also try cleaning your pads with sandpaper. There might be a problem with your rims, especially if they are painted. Consider using a variety of products on your rims, including rubbing alcohol, vinegar, degreaser, sandpaper and baby powder. It is recommended that you use kool-stop "salmon" pads to reduce squealing, even though certain bike types cannot overcome this issue.