Classic Markdown does not really support this, but for the second level, the preceding line of Hyphen-Minus characters - is turned into a thematic break, i.e. a horizontal line, <hr> in HTML. I believe parsers should have an option to suppress such breaks that directly precede a heading. This should probably not be part of the core specification, except that maybe lines of equal signs should also make a thematic break.
There is a discussion about adding Flowerbox headings to CommonMark in this topic:
This seems like a good feature to add to a Markdown successor language. I’m not sure how much value there is making this a CommonMark extension given that it will break existing documents and mainly exists for aesthetics.
These fall back gracefully to thematic breaks, but most of them are not visually pleasing in source view.
Other types we would need to defer to Commonmark 2.0 or whatever.
=======
Heading
=======
PS: One needs to take care if starting a document with a second-level flowerbox heading that uses only hyphens in environments that support YAML document metadata, because this is surrounded by triple-hyphen fences ---.