The Align palette has an array of buttons to align and distribute a group of objects. You can line up all their top edges, bottom edges, left or right edges; center them vertically or horizontally, and; distribute them relative to one edge. The limitation of these buttons is that they align or distribute relative seemingly randomly, moving objects all over the place. It’s not really random. Usually the last object you drew, the one highest in the stacking order, is considered the key object by Illustrator.
A key object is one that is used as the anchor, and all other objects move relative to it. For instance, when distributing spacing on three rectangles, two of them will move. Which two they are depends on the order in which you drew them. However, setting the center rectangle ast the key object, for example, makes only the rectangles on either side move; the center rectangle itself will not. This is very useful when you already have an object in its desired place, but need to make other objects snap to attention.
How do you set the key object? Simple: Select all the objects for alignment or distribution as normal. However, before clicking a button on the Align palette, click once on the object that will be the key. Don’t hold SHIFT, CMD/CTRL; just a normal click on the object. Nothing will deselect. Now, click the Align palette button. The key object won’t move (unless the Align to Artboard option is also selected), and the other objects will move relative to the key object.