There's a saying that every writer needs to write a million bad words before he writes any good ones. Like most aphorisms, there's some truth to it, and some exaggeration.
I started writing in middle school. I wrote a lot all through high school, and submitted my stories to all the contests they have for middle school and high school writing, and placed in a number of them. So I was actually a fairly good writer for my age group. That did not mean that I was a good writer overall. It was just that I and everyone else at that age was going through our one million words. So my bad words were maybe a little less bad than a lot of the other bad words.
One I started college, I pretty much stopped writing, and didn't pick it up again until I was well into Grad school. And lo and behold, I discovered that I was now a much better writer. I've always sort of wondered how that happened. It wasn't like I wrote my last bad word in high school, and when I started back up, I was starting to write good ones. For one thing, I had never written that much. But it does seem like it should have taken a lot more practice to turn the corner. Something must have changed in my life so that I was better.
Well, something did change. I was older. More to the point, I was wiser. I had read a lot more, experienced a lot more, thought a lot more, and even written a lot more, even if what I was writing was mostly technical. This, in turn, made me a more competent writer by the time I set pen to paper, or more precisely, hand to keyboard, again.
This did not, however, make me a good writer. I had become better, without practice, but that was not enough to make me good. I still needed the practice. I still had to write a lot, until my better prose became decent prose, and maybe even good prose (good enough to get published, at least). That's where I am now. I've sold five stories so far, and I'm hopeful that I'll sell more, so I'm at least that good, and I did it in well under a million words. But I have a long way to go in becoming a better writer, in learning how to do better dialogue and stronger characterization, in making my descriptions richer and my settings more alive. So in that sense, maybe I still have a ways to go in my million words.
So is there truth in the saying? Yes, in that every writer must write in order to become good at writing. That it doesn't come without effort. But the exact number isn't set in stone, and neither is writing the only thing that makes you better at writing. It's a necessary part of it, but it's not the whole of it.