Anyone can write something just for themselves. If you publish your writing, it's available to others. For a writer, to publish is about the best thing there is.
Like a lot of words, publish is used in a few ways. When a writer publishes six articles, six pieces of his or her writing have been accepted for publication in books or magazines. When a company publishes an article or book, it actually prints it up and sells it to the public. If you write a blog, you can also say that you publish your writing. Or, a teacher can publish a magazine of student writing just for her class.