The Chicago Manual of Style. Your basic writer's reference for all questions relating to grammar, punctuation, how to cite something correctly, and so on. You may purchase a physical copy of the book or buy an online subscription.
Writing Worth Reading by Nancy Huddleston Packer and John Timpane. An all-around excellent handbook to writing, especially on questions of style. Plenty of examples to aid understanding.
The Oxford English Dictionary Online. If you're a writer of historical fiction, a subscription to this dictionary which traces usage through time is invaluable. Chances are your local library owns a subscription, and you can use the OED with just your library card! Also has a helpful Historical Thesaurus.