Chris Bloomfield has written an excellent, step-by-step guide for installing and configuring GNS3 and using it to build virtual network.
GNS3 is actually the graphical front-end of Dynamips/Dynagen and allows you to drag-and-drop routers onto a stage, connect them up, run IOS on them, and save their configs, just as if you had your own network. It can be a little confusing to set up first of all so I will present a step-by-step guide below of how to install and configure GNS3 including a couple of advanced options which will allow you to run Cisco Security Device Manager SDM on your PC.
via Subnetting Made Easy And Other Cisco Tidbits: GNS3 Configuration Guide.