Astrophotography, also known as astronomical imaging, is the photography or imaging of astronomical objects, celestial events, or areas of the night sky. The first photograph of an astronomical object (the Moon) was taken in 1840, but it was not until the late 19th century that advances in technology allowed for detailed stellar photography. Besides being able to record the details of extended objects such as the Moon, Sun, and planets, modern astrophotography has the ability to image objects invisible to the human eye such as dim stars, nebulae, and galaxies. This is done by long time exposure since both film and digital cameras can accumulate and sum photons over these long periods of time.
Astrophotographers specializing in the Moon usually photograph it through a powerful telescope, a telephoto lens of almost any focal length is good enough to get a good Moon shot.