ahhhh.... i feel bad....
quickly..
experiment with Aperture Priority to adjust depth of field - eg a sharp picture of a subject with a blurred back ground = low F number ... a sharp picture of subject and sharp background = high F number...
experiment with Shutter Priority to adjust shutter speed - eg a fast shutter speed to freeze motion like a race car..... or a slow shutter speed to create blur... like those waterfall pictures you've seen...
as the others have said it's more complicated than this so read up and experiment....
as I joked before your Nikon D40 should not have Av and Tv... those are lame canon terminologies..