It's important to have a solid grasp of grammar and elements of writing like point of view. But more than that, you need to tell a story as honestly as you can, not holding back, and keeping the action true to what your characters would actually do. There's magic in storytelling, in building a world where all the scaffolding propping up the story is hidden and seamless and the reader gets lost in a world of fiction.
The publishing industry is incredibly competitive and there are no guarantees you'll be published or your book will sell. Learn as much as you can about the industry, be okay with rejection, and most importantly, write the best story you can. Write it for an audience of one--yourself. Write the kind of story you want to read and edit your story ruthlessly, making your writing as strong and bulletproof as you can.