HSM is what...haha..i am really a newbie :X
different lenses are good for different types of photography right..
haha don't worry! I'm a newbie too =)
For D40, only Nikon AFS lens and Sigma HSM lens can autofocus. The rest of the lenses, you will have to manual focus, which is a total bitch sometimes.
For the lenses, you have to slowly discover what you like to take.
If you discover you are always taking buildings, nature scenary and always at 18mm to take photos, you may need a wide-angle lens. (Nikon 12-24 4f or Sigma 10-20 HSM)
If you discover you are always zooming in to the max to take people, evens etc. you may need a good telezoom lens (Nikon 70-300VR)
If you discover you are always taking events and sports, you may need a good telezoom lens with 2.8f so that it's fast without flashing (Nikon 70-200 2.8VR, Sigma 70-200 2.8 HSM)
If you discover you are always taking subjects, objects, portrait etc at 50mm or 30mm, you may need a fix prime lens (Sigma 30mm 1.4f HSM)
Lastly, if you discover you struck Toto on thursday or monday, then you just buy all the best lenses you can find =)