Will the NIKON 50mm 1.8D work on my camera?

I know that this is a D lens. I currently have the D3100.It doesn't have a focusing motor in it so I guess you will need to manually focus it.Am I correct, I'm not sure. Will it actually work on my camera and take pictures.

What is important is if it is an AF-S lens.
AF-S lenses have super fast auto-focus motors in them.
AF lenses will have to be manually focused with your camera using the electronic rangefinder in your viewfinder.

Pretty much all nikon lenses can be used on all nikon DSLR cameras, with few exceptions
D lenses will, as you said, not focus on the D3100 or any other entry level camera, but they will work perfectly fine

You are correct, it will not auto focus. That's because the D3100 doesn't have an AF motor, so a lens would need the AF-S written in its name (thats the motor). If you are fine with focusing manually then go get it, but the 50mm f/1.8G AF-S version is $200, which is still very cheap.
Here's a Nikon Portrait Lens Guide - http://www.the-dslr-photographer.com/2011/11/buying-a-portrait-lens-nikon/

Baby nikon + AF lens = no autofocus
Baby nikon + AF-S lens = autofocus
- Nikkor 50mm AF-S 50mm f/1.4G or AF 50mm f/1.8G?
- Why is my non-DX Nikon 50mm f/1.8D lens actually 50mm in a DX camera?
- Will nikon kit lens 18-55mm 3.5-5.6 work as good as nikon 50mm 1.8g or nikon 35mm 1.8g?
- Is there a difference in quality between Nikon 50mm 1.8 AF and Nikon 50mm 1.8 AI-S?
- Nikon 50mm 1.8 or nikon 50mm 1.4?