Usually an author tries to have just a few level 1 headings, and divides the text between level 1 headings with level 2 headings. Long documents might use more levels of headings. For example, a book-length document would use level 1 headings for chapter titles, level 2 headings for the main sections within a chapter, and perhaps level 3 headings for fine divisions of a section.
Here is a web page with some headings in it. Click on the button to see how your browser displays them. Change the level of some of the headings to see what happens.