The term "writing" describes any process of recording characters on some permanent or at least semi-permanent medium, with the intention forming words and other larger linguistic constructs. For example one can use a pen to write characters on paper, or a computer to record characters to disk. Of course the use of pen and paper has historical primacy, and it could be argued that the second is only analogous to writing. Still, common use writing refers to recording visual characters either on physical or electronic media.
In the western world, this means putting characters together to form words and sentences. In cultures using idiograms, each character used represents a word or concept, which can then be put together to form sentences.
"Writing" is also often used, to describe the craft of creating a larger work of literature. This is an extension of the original meaning which would include the act of writing longer texts. Writing in this sense can refer to both the production of fiction, non-fiction, and poetry.