Even though LaTeX knows most there is to know about font sizes and spacing for different parts of the document, it cannot detect the purpose of the text. Although many documents will be fine with the standard fonts, there are also documents which need changes to the headers to look interesting. This is what the sectstypackage is for.
There is a lot of things this package will do. Have a look at the documentation. You can prevent the text from being justified between narrow margins, add rules and boxes, or make the header underlined. But that whatever you do, you should think it through thoroughly before making any changes. Underlining, for example, should almost never be used. Pick a book from your bookshelf and try to find underlining. Chances are there will not be a single occurance. Underlining will lower the reading speed (and will probably make your document look ugly as well).
\documentclass{article} \usepackage{sectsty} \allsectionsfont{\sffamily} \subsectionfont{\mdseries\itshape} \begin{document} \section{Top level header} Some text \subsection{Subsection header} Some other text \end{document}