well, simply put. . .it just knows.
Just kidding. It's like when you push any other letter and that letter is put in. When you hit enter, a newline is added.
Lets say you type in
hello
this is
a newline
In your database, it will look like this
hello\n\n
this is\n
a newline\n
If you simply echo this out, it will display as
hello this is a newline
That's because \n doesn't create a break in html, it just creates a new line (which in html is only for code structure, not for actual breaks). What you want to do is convert the newlines to breaks. You can do this with the php function nl2br()
Cgraz