Reference.com states that a diffraction grating is an optical component that can split light into separate beams traveling in different directions. The space between each beam depends both on the light wavelength and the spacing of the grating.
Reference.com indicates that gratings are often used in monochromators, devices used for transmitting waves of radiation, and spectrometers, devices used to measure the properties of light. Generally, a grating has grooves running on its surface, but a photographic slide with black lines on the top can also suffice as a very basic grating. Gratings can appear as transparent or reflective. The theory of operation states that the relationship between the grating spacing and the angles of the incident and diffracted beams of light is known as the grating equation.
According to Wikipedia, the Huygens-Fresnel principle states that every point on the wavefront of a reproducing wave may be considered a point source. The wavefront of any following point can be found by finding the sum of the preceding individual point sources. An ideal grating is made of slits spaced to be wider than the wavelength to cause diffraction. Every slit in a grating acts as a point in which light can reproduce in all directions.
Reference.com states that James Gregory initially discovered the concepts behind gratings approximately a year after the prism experiments by Newton. Things such as bird feathers were used as gratings at this time. Eventually, in 1785, David Rittenhouse made the first artificial diffraction grating by stringing hairs between threaded screws.