Consider temporarily deleting your question
You're willing to improve your question, and that's great! However, until you've improved it, the bad version of your question is still on the site, and people are free to vote on it in its current state.
If you delete it, people can't see or vote on it, gaining you lots of time to improve the question without worrying about score. If you've deleted your question yourself, you can undelete it at any time.
You can find your deleted questions by going to your profile, the tab questions, and then click recently deleted questions. However, that's only available for 60 days after asking it. If you want to work on questions that got asked longer ago, you can bookmark it and still visit and improve it, but you need to keep track of the link.
Note that questions that have accepted or upvoted answers, or have multiple answers can't be deleted. If this is the case, there's more urgency for you to improve your question, to avoid further downvotes.
Make sure you're up to date on how to ask on Stack Overflow
If you're new on the site, it can happen that your first question got received poorly because you misunderstood the purpose of Stack Overflow.
If you haven't followed the tour already (or don't remember what it said), you can follow it here.
Two other important resources are within the Help center: How do I ask a good question? and What topics can I ask about here?. They're intended to help you ask good questions, and contain lots of useful information. Make sure to take your time and read them thoroughly.
Make sure your question is on-topic, or can be edited to be on-topic
On Stack Overflow, we don't accept questions about all topics. You can review the topics you can ask about here.
Some questions can be edited to be on-topic, for example questions that got closed for lacking a minimal, reproducible example. However, questions unrelated to programming altogether (for example, Where are my keys?), questions requesting off-site resources, or simple typographical errors are off-topic and often can't be edited to become on-topic.
If you've asked a question that can't be edited to be on-topic, the best course of action is to delete it, and not improve it.
If your question got closed as a duplicate, but you disagree with it being a duplicate, that's a specific case. Read “This question may already have an answer here” - but it does not - or - What can I do when I think my question's not a duplicate?. If you agree with it being closed as a duplicate, you may leave the question to help others find the linked duplicate.
If you got another on-topic question you want to ask, and are unable to ask new questions, and have no answers, per the guidance in this answer you can consider editing the old question out, and a new question in. Do note that asking a new question often gets more attention, especially if your question is already closed or downvoted, so often asking a new question is a better idea.
Review comments and close reasons
Often, when a question gets received poorly, users indicate why they think it doesn't fit the site. These comments might be key to improving your question. If a question got closed, there's also a description of why it got closed, often including links to helpful resources.
Try to read and accept what they say. They're intended to help you learn and improve. While you may sometimes disagree with them, try to understand why they got placed, and how to improve your question to avoid others think the same.
My question is (or can become) on-topic, I've read the help section, but I'm still unsure how to improve it, or think it was judged wrongly, what now?
If you've gotten to here, you probably want to win in help of others. Luckily, there are often plenty of veterans around that are willing to help someone that's putting in effort to understand Stack Overflow and improve their questions.
If you have over 20 reputation, you can use chat. Check if there's a general chat room about the programming language you're asking about, and if they have specific rules for you to adhere to. If there is one, it's often a good place to ask for help. Note that if your question is deleted, users with less than 10K rep will be unable to see it, so you can share a screenshot when asking for help.
If you have less than 20 reputation, there is no chat room available for the language you're working with, or you didn't get the help you were looking for, you can ask on meta. Even with 1 reputation, you're allowed to ask about specific questions on meta.
Asking for help on meta is a little more formal than asking for help in chat. Make sure to:
Create a descriptive title asking for help
Not Why was this question closed but for example How do I improve this SQL question to not be too broad
Share your attempts
If you've read the help center, and tried to improve your question, that's often truly appreciated. You can share why you think your question is a good fit for the site, or ask about how to implement tips you've found in the help center
Be open to criticism
If there's something that should be changed about your question, others will probably point it out on meta. That's not to shame you, but to help you improve. If you act defensively or rudely to the people that are trying to help you, that often doesn't end well. Be sure to keep an open mind, read, and ask for clarifications if you don't understand or agree with criticism.
Note that while you should be open to criticism, you don't need to accept rudeness or insults. This rarely happens, but if it does, don't engage, flag rude comments or answers as such, and wait for the moderators to intervene.
Good tags to ask about improving a specific question are support, specific-question, and if the question got closed, you can include a tag for the close reason used.