Open Office: How to get rid of a straight line in my document?

Sometimes when I am typing in an Open Office document, a straight line will just appear when I press the enter key. I can’t erase it or delete it. Even if I press CNTRL Z, it won’t undo the line, it appears to be a permanent fixture. How do I get rid of this line? And how do I prevent that happening to begin with?