Freewriting is a way to record one's thoughts as they occur. Rather than letting one's inner editor interfere with one's writing (something writers often do), freewriting disallows editorial intervention in oneself.
This is a form of stream-of-consciousness writing. Physician, psychologist and philosopher William James (brother of, guess who, Henry James), invented the term "stream of consciousness." A famous bout of stream-of-consciousness writing ends James Joyce's Ulysses. Note, though, that literary stream-of-consciousness writing may actually be edited.
For my purposes here, free writing is not literary stream of consciousness. It is actual stream-of-consciousness writing (as close as one can come to recording one's own thoughts in words, which I realize is an imperfect art).
I recommend using a pen and paper rather than a keyboard, for keyboards make deleting text tempting, and frequent typos will make one's inner editor wake up screaming from its slumber. In freewriting, one cannot go back and change anything: spelling errors, weird words, embarrassing thoughts, nonstandard grammar, improper punctuation must all remain. Just keep writing, without stopping or going back to change things, for at least 15 minutes.
Pure freewriting has no topic at all. The results can be weird and disturbing, but pure writing is useful for unblocking yourself or working on a problem that you are not sure you have or when you are not sure what the problem is.
Focussed freewriting has a topic. Focussed freewriting is beneficial for working on specific ideas. Unlike pure writing, focussed freewriting could be clear enough for someone else to read, but again, without fussing about grammar or even logic.