To install a subpanel, first decide on the location. Then, remove the lowest amp rated double pole circuit breaker from the main breaker box, so you can install a new breaker to feed the subpanel. The breaker that was removed is installed in the new subpanel. Route the wires to the subpanel, and connect a four-wire power supply cable from the main panel to the subpanel. Connect the neutral and ground connections before the hot connections.
Route in the subpanel feeder cable, and remove any neutral bonding jumpers to ensure that ground and neutral are only connected at the main panel. Join the branch circuit wires, and install the new breakers.
To finish the job, fasten the door to the subpanel, and turn the main panel's sub-feed breaker on. Turn on the main panel's main breaker and the subpanel's main breaker. Double-check that the circuits are working, and update the labels on both panels.
Before starting the job, shut off the main power breaker, and check with the city to see if you need a permit to undertake the job. Remember that the subpanel needs to be easily accessible, so it should be installed in an area of clear space. The National Electric Code contains specific guidelines for the space that is required around a subpanel.