That's an excellent question, but a hard one to answer. I think this is something you have to feel out with your preceptor, because each one has a different personality. It comes down to trusting your common sense, trusting your judgment. Some are very open to questions and you will feel free to ask anything, while others will get very annoyed and think your questions are petty, especially if it's an awkward time. Try to use common sense and assess if it's a good time. You can usually tell if an attending physician is open to your questions. Often, you can figure this out when you are discussing a particular patient, or they might ask you if you have any questions. That's your cue to ask what's on your mind.
In general, there are no "bad" questions, as long as you ask an informed one, but be judicious, especially when asking an attending. When you ask something, make sure you learn the topic as much as possible and know your patient. How you frame the question may be give you different answers. Expect to get pimped on the subject or the patient (if I asked something related to CHF, I better know a lot about CHF and that patient with CHF). The answer may be, "go look it up," or "What do you think, Doctor?" If you make an effort, it will be rewarded usually, although not necessarily right away. You should be fine as long as you avoid bombarding your attending. Don't ask questions you can look up (this is common sense), or you will most certainly get pimped. Instead, try looking it up first and if you can't find the answer, then ask. Ideally, you should be reading about your patients when you can. When you are well-informed, your questions will likely be good questions.
As a general rule of thumb, I try not to ask up the chain, especially without first attempting to look it up and figuring out the answer myself (there is time to do this during the day, believe it or not). After you tried and can't come up with the answer, learn as much as you can about the subject (or if you have already read up on the subject) and ask a resident on your team before asking an attending. Remember who you are asking your question to. If it's an attending, it's probably best not to ask basic things. It may be more beneficial to ask questions that would benefit from his years of experience. If your common sense says that it is something you can look up, try looking it up first before asking.
Remaining absolutely silent, especially when you don't understand something, won't serve you too well, I think. Most people will just take your silence as understanding. If you do have a burning question or you simply don't understand, then just ask. Ask in the most informed way possible, based on what you know. The worst that will happen is that you will get an unfavorable response and then you can adjust accordingly. The responsive will tell you a lot, particularly revealing any real deficiencies or lack of understanding you still have. It's a learning experience after all.
I'm sorry, that's the best I can do. Honestly, I never thought much of it. I just tried to know as much about the patient and the subject, before asking something, so I could ask an informed question. Everything had a natural flow, because we were usually discussing the patient as a team. My questions to attending physicians these days are related to his approach, workup, or management of a given patient, especially if it's non-standard, not basic knowledge type stuff (unless it differed from what I read in standard texts and I want to understand his reasoning). I tend to ask attending physicians why or how he chose a particular diagnosis out of a differential, especially if it is not obvious to me or my initial assessment was different, so I can learn from his experience and adjust my own internal algorithm. When I get pimped, I may ask follow up questions, especially if I get the answer wrong.
I don't know if my answer helps you at all. I'm having a hard time breaking this down, I guess. I feel like I'm just rambling. What do the senior residents and attendings think?