In general, a writer is anyone who writes something. An author is someone who creates something new and original. Usually this new work is in written form, such as Lev Tolstoi's novel "Anna Karinina" (like erpm mentioned above) or a work of poetry like Walt Whitman's Song of my Self. However, one could also say that a computer programmer who creates a new program or code is the author of that program or code.
A writer is an action that someone does when they write something. For example, one can write a letter, a report, a movie script, or a book. An author is something someone becomes when they create, usually by writing, something that is new and original. For example Leo Tolstoi is the author of "War and Peace" because he wrote it.