Terminology: spectrum, spectrogram, spectrograph, sonogram, etc
It depends on context.

In signal processing, a spectrum (plural is spectra) shows the frequency content of an entire signal.  It's a 1-dimensional function of amplitude (vertical axis) vs frequency (horizontal axis):



Spectra are often shown with a logarithmic amplitude axis (such as dB), but this isn't necessary.

A machine that produces a spectrum is usually called a spectrum analyzer.  In other fields, the machine is called a spectrograph or spectrometer.

A spectrogram shows how the frequency content of a signal changes over time. It's a 2-dimensional function of amplitude (brightness or color) vs frequency (vertical axis) vs time (horizontal axis):



Sometimes this is called a sonogram.  The time and frequency axes are sometimes swapped.  If amplitude is shown as a 3D surface rather than using color, it's called a waterfall plot.

Confusingly, a machine that produces a spectrogram is also called a spectrograph, or spectrograph is used as a synonym for spectrogram.

Also the line is kind of blurred, because if you view the spectrum of a live signal on a spectrum analyzer, it's displaying the spectrum of small chunks of the signal and you're seeing how it changes over time, which is essentially the same thing as a spectrogram.

I think the important distinction is just the way they're displayed:  A spectrum is a 1D plot and a spectrogram is a 2D plot.