Any number of= will create a h1 header, any number of- a h2 header.
Paragraphs in markdown are separated by blank lines. If you do not add a blank line after any text, the --- will be interpreted as applying to the text above, thus formatting it as h2.
Thus you don’t need spaces between the dashes like - - -. I think by “post header” the author just means “post” in the sense of “after” → using dashes directly after a line in order to format it as a header.