Click on the link below and it will take you through a fitting.
http://www.competitivecyclist.com/za/CCY?PAGE=FIT_CALCULATOR_INTRO
Basically a fitting is taking measurements of your body such as your inseam, reach, height, etc., and using this information to get the correct frame that fits your body and setting it up with the best seat post, stem, and other items that fits you bodily dimensions.
A simple example where fitting is used is in the following situation. Someone with very long legs would need a tall frame. However, if he has a short torso, he will be stretched out like Superman in flight. Therefore he would need a bike with a shorter top tube. To take care of him, his LBS would probably go down a size smaller from the frame with the optimum seat tube length to get a shorter top tube. They would then adjust the seat post to get the optimum seat height for his leg length. If he has long arms, they can put a longer stem on the bike, or a shorter one if he has short arms.
One really important part of fit is the saddle. The distance between your ischial tuberosities (sit bones) needs to be determined so that the proper width seat can be put on your bike. Your LBS will probably have you sit on some kind of cushion or cardboard and measure the impression to determine the width between your sit bones. They will then suggest that you use a certain width of saddle so that your weight is supported by your sit bones and not the soft flesh in between them. If your saddle is not wide enough, you will experience some very intense pain during and after each ride. They will also adjust the tilt of the saddle so that you are not putting too much pressure on other parts of your anatomy.
In a nutshell, fitting is getting the right size bicycle to ensure a comfortable ride. Fitting is essential! You won't ride if it is not comfortable.