Welcome to DSP SE!
A Spectrogram is a time-frequency representation: a representation of the spectrum of frequencies of a signal as it varies with time.
You can think of it as a non-negative (when you take the absolute value as you mentioned) 2D matrix (think columns = time, rows = frequencies, with each entry in the matrix containing the amplitude of a particular frequency component at a particular time instant).
NMF is a group of algorithms that aims at expressing a non-negative matrix $X$ as a factor of 2 non-negative matrices $W$ and $H$. In our case, NMF tries to separate the time-frequency information contained in our Spectrogram $X$ into 2 matrices: one for frequency, one for time:
- $X$ is the spectrogram magnitude, so it can be factorized into
- $W$, a set of basis spectral vectors, and
- $H$, a set of temporal activation weights.
I know these terms can be quite confusing. May I suggest you study this great tutorial: Bill Connelly - Nonnegative Matrix Factorization for Dummies? If you still have questions (maybe a little more precise than the one you asked), feel free to edit or add to your original question ;)