Preparation is essential to any do-it-yourself electrical project. You may have some options available that do not necessarily require you to install a second electrical box or sub-panel. At a minimum, you should plan to have an external battery-powered light source to help you complete your work. You also need to examine the layout of the house and determine where you have space to install the sub-panel, if needed.
Upon further inspection, you may find that you have some additional alternatives to adding the sub-panel box. For instance, if you have an electrical panel that uses copper pigtailing and aluminum-to-aluminum wire splicing, you may be able to find thinner front-to-back electrical receptacles to rewire the box and create additional space. Electrical box extensions are also available in a variety of different forms. A third option is to simply add a box with overall greater space.
If your lack of room in your electrical circuit box can only be fixed by installing a sub-panel, then you can begin the installation process. This is actually a fairly complicated process and will require some careful consideration, planning and meticulous work. Many states and local communities require a permit to perform this type of work and you will also probably need to get your work inspected by your local electrical inspector. The installation process involves removing the sub-panel cover and mounting the sub-panel box first. Once this has been completed, you can then begin to remove the circuits you intend to reroute from the main box. Ensure that each circuit has enough wire to allow you to reach the sub-panel. Connect the circuits and breakers to complete your project.
Changing the circuits in your existing circuit box, or installing a sub-panel to accommodate your lack of room, can be dangerous if you don't know what you're doing. If you have no experience in this area, your best bet is to contact a qualified electrician to complete the installation for you. As a minimum, consider having an electrician make some recommendations regarding the best course of action.