"But seriously, folks: the basic test of whether someone is a real writer or not is if they really write. There's no magic to it. Either you write or you don't. It's that simple."
I don't know the origin of the quote but it's absolutely true. You may not be a published writer, or a bestselling writer, but if you write, you are a writer. Being a writer doesn't mean you are selling your books or that your books are with a particular kind of publishing company.
It boils down to the physical act of putting pen to paper, hands to keyboard, whatever you do to get words on paper. Do you really write? Do you just think about it, plot the book in your head, do research but never put words together to make sentences and scenes. Plotting and research are part of writing, but to be a writer you have to be actively producing work, not just talking about "Some day when I have time." or "When I retire." and "I have great material for a book, you should write about it."
Plain and simple, no magic, if you write you are a writer.