When a spectral line passes through any spectroscopic instrument it appears not as infinitely sharp, but with width. This width is dependent on the design of the instrument, and is commonly (although not always) adjustable, for example by altering the width of an exit slit (and sometimes an entrance slit as well). When two lines of nearly equal wavelength are present the the instrument then they may or not be seen as two separate lines in the output spectrum. The ability of the instrument to see the lines as separate is defined in terms of its resolving power (resolution). If the minimum wavelength difference between lines which can ust be resolved is δλ, then the resolving power is defined as
For example, the wavelengths of the sodium D lines are approximately 589.0 and 589.6 nm. In order to see these as separate lines then the resolving power of the instrument must be at least 589/0.6 = 1000. On the other hand if you want to see the blue line if the spectrum of hydrogen and deuterium ( = 486.274 nm and 486.138 nm respectively) then you would need an instrument of resolution 486/0.136 = 3600.
The diagram below shows the spectrum of a lamp emitting spectral lines of two very nearly equal wavelengths. You can change the resolving power of the instrument using the buttons above the diagram, and see the effect on the output. When the resolving power is high then the lines are seen as separate peaks in the spectrum, but as the resolving power is reduced the lines blend into one another, eventually becoming indistinguishable from each other and so form a single peak.