Diffraction refers to various phenomena which occur when a wave encounters an obstacle. Diffraction grating is an optical component with a periodic structure, which splits and diffracts light into several beams travelling in different directions. The directions of these beams depend on the spacing of the grating and the wavelength of the light so that the grating acts as the dispersive element. In simple words, optical device used to learn the different wavelengths or colors contained in a beam of light is called diffraction grating. These are commonly used in monochromators and spectrometers.