Generations of young children have been admonished with variations of a quote typically attributed to Mark Twain:

Better to keep your mouth closed and be thought a fool than to open it and remove all doubt

I say generations, because the same link points out that it probably arises from Proverbs 17:28:

Even a fool, when he holdeth his peace, is counted wise: and he that shutteth his lips is esteemed a man of understanding.

In my experience this is a piece of poor advice that has stood in the way of understanding and progress! I would say that the only foolish question is the one you are too afraid to ask, and the only thing foolish about it is that you are afraid of being held to be foolish! In every educational situation I can think of (and I can think of many), there is almost no time when it makes sense to sit wondering what someone means when they are talking (OK, there is one, if you’ve been too lazy to read some preparatory material), or having asked a question, be afraid of following up because you didn’t understand the answer. How foolish is it to keep your mouth (keyboard) shut and never know the answer to your question?