Spectra are similar in that they all are the light emissions from specific electron orbitals. They are different by the specific wavelengths of light that are emitted.
Each orbital has a specific energy value. An electron “relaxing” - moving from a higher energy orbital to a lower one – will always emit the same wavelength of light.
Different elements have different electronic structures, so the electrons available for movement between orbitals are different. Thus, we can identify different elements from their spectra.