For star trails and large constallations (Orion, for example), or even the milky way itself, normal camera lenses, from wide to tele, should work well.
For the moon, some people have good success using 300 ~ 600mm telephoto and sometimes with 2x teleconverter. The moon is very bright, so usually a single exposure of around 1/100 ~ 1/250 sec is adequate.
You can also use a telescope with SLR or digiscoping for the moon.
For planets and some galaxies and nebulae, higher magnification is needed, so a telescope and appropriate coupling for digicams or DSLRs is required. Also, other techniques/equipment such as tracking/guiding and image stacking is required.
Most consumer digicams and DSLRs include a IR filter in front of the sensor, which reduces the sensitivity to certains wavelengths that are important for astrophotography, so some users would modify their cameras to remove the IR filter.
There are also specialised astrophotography imagers.
In short, depending on what you want to shoot, you can spend little using existing equipment or literally thousands on specialised equipment to get a shot that you can easily download from the internet...