The DTD defines the relationship between each of the elements. The DocBook DTD, used to create this document, is an example of this. The DTD lists the rules that the content must follow. Finally there is the Content, which is what gets rendered by the SGML processor and is eventually seen by the user. This paragraph is content, but so would a graphic image, table, numbered list,and so on.
Content is surrounded by tags to separate out each element.
SGML provides for more than just formatting. You can automatically build indexes, table of contents, and links within the document or to outside. From these basic formats, you can then create other formats such as MS Word, PostScript, PDF and so on. Programs like LyX allow you to write in TeX format, then export it as SGML and render from SGML to whatever you chose. In the end, SGML is more concerned about the way elements work instead of the way they look.