All throughout my life I have always heard that there is no such thing as a stupid question. While the intent in that statement is in the right place it is not entirely true. While you should never be ashamed to ask a question you are genuinely curious about, it is also important to take the proper steps to formulate an effective question. This includes doing prior research, before asking a professional said question, just in case it is very easily solved by a google search. Letting them know you researched it first also makes a better impression on the person you are asking.
Good questions are often questions that you have attempted to solve on your own first. You also should ask them in the proper place/forum. An example of a good question that I found on StackOverflow is https://stackoverflow.com/questions/52215806/css-pseudo-elements-how-to-change-the-color. The question is placed asked in the correct place and he provides some background information about himself. The question is also concise and easy to understand.
Bad questions are often overly convoluted or poorly constructed. They are needlessly hard to understand and in some cases asked in the wrong forum/place. An example of a bad question is https://stackoverflow.com/questions/52216345/syntaxerror-cant-assign-to-operator-in-python. In this question, there isn’t even a question. He just posts some code and the error that he got. There is no background information and he put very little effort in to the question he asked (considering there was no question asked).