How to use camera with laptop?

I have a Nikon D3100 and was wondering if there was any programs/software that would allow me to take pictures on my camera which would be plugged in to my laptop and the picture would appear instantly to check to see what it looks like? (I have seen this done at school for example I would just like to know the name)

Check the CD that came with the camera. You are looking for tethering software.

Only certain dSLR's can be tethered. No entry level cameras are included in those at this time
Here is a list of Nikon's cameras that can be tethered with Nikon's
http://www.nikonusa.com/...atibleWith
You will see that the Nikon D5000 and D5100 are the only two entry level Nikon's that can be tethered using the Nikon program.
A select number of Nikon dSLR's can also be tethered using Adobe Lightroom 3