Do you mean How do I insert a rule below a heading?
Here's an example, using a single rule below Heading 2 (and heading 4), and a pair of rules above and below Heading 3.
Borders and rules are controlled in the More section of the Text inspector:
For Heading 2, click anywher in the 'paragraph' "Heading 2", then make the Inspector settings shown in the "Borders and Rules" section. For heading 3, the settings are the same, except that the third button is selected in place of the (highlighted) second.
You can capture this setting as a Paragraph Style. With the insertion point anywhere in "Heading 2", go to the Format menu and choose Create new paragraph style from selection. Give the Style a descriptive name. The name will appear in the Styles Drawer, and may be applied by selecting a paragraph (heading) then clicking the style name.