If it's a dotted underline, it means you're typing Hidden Text (with
Show Hidden Text turned on). To check on this, type Ctrl-Shift-8. If
all the text goes away, that's what it is; just press Ctrl-Shift-8
again, select all the dotted-underline text, and press Ctrl-Shift-H.
Otherwse, maybe you've turned on Underline (dotted), which you remove
by selecting the underlined text and clicking the Underline button
twice (the first time changes it to a single line, the second time
turns it off). But you'd have had to really want to turn it on -- in
Format > Font > Underline drop-down.