You indicate the level of heading with the number of prepended # symbols. So:
# This is a level one heading
## This is a level two heading
# This is another level one heading
The content collapsed underneath each heading should include all of the content less than that heading. So e.g., all text and other headings “lower” than heading level 2 (e.g., level 3, 4, etc.)
In the example above, content underneath Heading 1 should be collapsed until the next heading 1. Content under level 2 should be collapsed until the next heading 2 or 1.
Make sense?