Pull the center dash rack out about 4 to 6 inches.  Once you have done this, reach over to the right side and pull off the ground connector as shown in the picture on the right.  Continue to pull the rack out.  This step is why it is important to put the car in a gear lower than park.  You will find that if you do not, you won't be able to pull the rack out.  The shifter will get in your way which is very annoying when your hands are busy with other things.

Here is the stereo pulled out.  The box with the big yellow sticker on it is the airbag control box, leave it alone!  Now you can disconnect your current stereo and connect up your new one.  Below I have included the pin-out for the 14-pin connector standard in a Subaru.