mostly, we use the one-dimensional spectrum. But sometimes we use two-dimensional spectrum, what's the differences between them?
When you place a spectrograph slit on a source, the spectrum recorded can be thought of as lots of images of the slit at different wavelengths.
Ordinarily, you would sum up this spectrum along the direction of the slit images to give you a one dimensional spectrum. If however, you leave the image as recorded, then you have a two dimensional spectrum - intensity as a function of wavelength along one axis and as a function of position along the slit in the other.
Two dimensional spectra are used when we expect the spectrum to vary with position along the slit. Examples might include a spectrum recorded across a galaxy, or a spectrum of a binary star with the slit placed across both components.
An example is shown below. The inset image shows a broad-band image of V458 Vul - a classical nova that is surrounded by (not visible) shells of ionised material. The authors of this particular study lined up a spectrograph slit as shown in the inset and then obtained the two two-dimensional spectra shown in the main image. What you have to imagine is that each position on the slit produces a horizontal spectrum at a vertical position that corresponds to its position on the slit. Therefore we see a bright spectrum across the middle corresponding to the central source, but there are then "knots" of emission at particular wavelengths that are some distance away from the central star.
Slitless two dimensional spectroscopy is also possible using integral field spectrographs. Fibers record spectra over a two dimensional area. This can also be referred to as two dimensional spectroscopy.