Time for a basic introduction to lens terminology
Most important is the
focal length. This is displayed in mm. At the moment you have an 18-135mm lens. This focal length must then be multiplied by 1.5 due to the size of your camera's sensor to give an
effective focal length of approx 28-200mm.
A 50mm lens has a focal length of 50mm, effective 75mm. This cannot change - it is a fixed focal length, not a fixed distance.
A 70-300 lens can change its focal length between 70 and 300mm, effective 105-450mm.
Next is the
aperture. This is displayed by a
f-number, or several. This f-number only represents the widest aperture, the lens will be able to use a smaller aperture should you wish (with rare exceptions which you shouldn't worry about). Some lenses display 2 f-numbers in their title, for example your 18-135mm lens is (at a guess) f3.5-5.6. This means that the widest aperture decreases as the lens zooms in. Some lenses have only one f-number in their title; this means either that they do not change focal length (50mm f1.8) or that they are able to maintain a
constant aperture (24-70 f2.8). Maximum apererture has no direct relationship with lens quality. It only represents the amount of light that a lens lets in.
Maximum magnification is another property of lenses. This shows how close-up you can photograph things and is a combination of
minimum focus distance and
focal length. A true
macro lens is a lens that will give a
magnification of 1:1 (lifesize). Many lenses put macro in their title, but are unable to produce lifesize images - an example of this is the sigma you quoted above. The sigma will only produce 1:2 images (half life size). Nikon calls their macro lenses
micro.
HSM, USM, SSM, SWM are all acronyms for the fact that the
autofocus motor is located in the body of the lens and uses piezo-electric technology rather than a screw-drive in the body of the camera. This does not produce faster autofocus, nor does it produce slower autofocus. Autofocus speed depends on many things, including maximum aperture, focus design (front, floating, rear etc), the bodies focusing algorithms, lens gearing amongst others.
However, piezo-electric technology is generally considered to be more advanced than screw drive because:
It is almost silent.
It 'feels' faster.
It allows manual override at any time without having to disengage the screw drive.
It potentially allows for finer control when dealing with very small movements.
Your D40 does not have an autofocus motor in it. Therefore, if you want a lens that autofocuses you will need to buy a lens with the motor in the body. Otherwise you will have to turn the focus ring to focus the lens.
The final property of lenses, which you did not mention, is
image stabilisation. Your D40 does not have image stabilisation built into its body, so if you want to stabilise your lens you must either buy a lens with stabilisation built in, or buy a tripod/monopod/beanbag. Each of these methods obviously has its own pros and cons, for example a tripod is the most effective form of image stabilisation, but is considerably bulkier than stabilisation built into the lens, which is bulkier than stabilisation built into the body.
If I didn't answer anything, feel free to ask