When those doubts creep into your mind, deal with them before they cripple you. Like any other skill, the best way to overcome lack of confidence is to study and practice the craft of writing.
1. Write regularly
While not all of your writing needs to be for an audience, you need to practice often. That's the best way to hone your skills, and the improvement will build confidence in your craft. Are you a new writer? Or maybe you're just breaking out of a long period of writer's block. If so, start by keeping a private journal or responding to writing prompts.
Are you struggling with a certain aspect of your writing? Then work on it. Whether it's dialogue, description, grammar, you will improve with practice.
2. Read often
If you follow this blog with any degree of frequency, then you already know my sentiments about the importance of writers reading. It applies here. It exposes you to different writing styles, expands your vocabulary, and inspires you in your own creative work. And by all means, be versatile. If you usually read novels, try a collection of poems. Do you prefer memoirs and biographies? Consider a short story anthology. Expanding your horizons can help improve your writing.
3. Spend some extra time on revisions
Often, when you struggle with a certain aspect of writing, it's all too tempting to review those difficult spots quickly to get them over with. But when you do this, you miss an opportunity to make a rough passage shine. Spend extra time editing those elements you find problematic. You can improve your work dramatically.
4. Share your work and ask for feedback
There has never been a time when it was easier to share work and get feedback. If you're not ready to join a local writing group, many writing forums have private sections for members only. You can post short passages and get feedback from fellow writers. When you're ready to move beyond that, start a blog and post short passages there.
Ultimately, the goal is to build your confidence enough that you can join a local or online group and contribute regularly. Honest feedback will allow you to move on to publishing for a wider audience. And isn't that why you're here? You want your writing to be read.