Brakes squeal because there is always a certain amount of flexibility in the arms holding the pads. When you brake the rim pulls the pads forwards and distorts the arms, allowing the pads to lose contact partially with the rims. Having lost contact they spring back then grab again and the same sequence is repeated, often fast enough to set up a loud vibration or squeal.
To prevent it, the pads need to be toed in, i.e. set up on the arms so that the fronts contact the rims before the rears, this will pull the pads into the rims so that, at the elastic limit of the arms the pads are more or less parallel and grabbing at their hardest. To do this, loosen the pad bolt and clamp the pads against the rim by squeezing the brake arms together while trapping a couple of thicknesses of a cereal packet lid at the backs of the pads. Gently tighten the bolts ensuring the pads don't move then nip them up tight. A bit of grease on the bolts might help you to get them tight without displacing the pads.