How can I turn off the loud sound my D3100 produces when I take a photograph?
Just use the Quiet Drive mode on your D3100. It is marked by a Q.
What you hear is the Mirror-Slap and cannot be removed completely unless you change to a mirrorless camera which are extremely quiet. The Nikon 1 J1 for example is ultra-quiet because it does not have a mechanical shutter either, which is the other noise the D3100 does.
To use the Quiet mode, press the shutter has you take the shot and it will do so more slowly than usual. Then, release it slowly, maybe a few seconds later when there is more ambient noise. This reduced the noise from the mirror since it moves slower.