You've probably heard the phrase "time is money" as a way to express that time is valuable, and should not be wasted. I think that analogy underestimates the value of time. Losing money is bad, but it is possible to recoup lost funds. When time is lost, it is lost forever. As a basic sign of respect, it is important to show others that you value their time, especially in the workplace, and even more so if that person is junior to you. I can't stress this enough: everyone's time is valuable.
In this post I'll focus mainly on requests for help that fall outside of the helper's job duties. For example, someone might ask me for technical help even though we have an IT department and IT support from vendors, because I'm "good with this stuff". While it's particularly important to respect someone's time when you ask for this kind of help, the advice also applies to requests for help that do fall under one's job duties, as a show of respect to your colleagues.
A common problem, especially in academia, is that people are often asked to provide free labor. Free labor is work that falls outside of your job description, or goes above and beyond the duties that your job description entails in quantity, and yet does not advance your career. In academia, unpaid work disproportionately falls on the shoulders of women and people of color. Because free labor does not translate to career advancement, and dips into time that would otherwise be used for career-advancing productivity, it contributes to the underrepresentation of marginalized people in positions of power (e.g., in STEM).
Asking for free labor is one way that someone might devalue another person's time. Devaluing time takes many forms and can happen in any workplace setting (also in social settings, but I've limited the scope here to the workplace). When you feel that someone does not value your time, resentment can set in, especially when that person is in a position of power over you. Social dynamics affect productivity when you work in a team. If a co-worker devalues your time, you may feel resentment toward and/or avoid interacting with them (esp. habitual time wasters), even when it costs you productivity. In some ways that's the healthy choice: maintaining mental well-being is more important than being productive (and harm to your mental health is counter-productive; see: mental health in the workplace).
How can these issues be avoided? To work as a team, we need to ask one another for help, and whether you ask for help in a way that respects the other person's time can determine how the request is received. It is also important to weigh your request carefully before you ask for help from women or people of color that falls outside their job description, given that these requests disproportionately fall on them.
Problem: Asking for help with no notice
Unless the person you're asking for help provides an on-call service dedicated to addressing problems of the sort you need help with, you should not expect them to drop what they're doing to help you with your work. (Emergencies, such as equipment failures that must be dealt with immediately, are an obvious exception).
To stay productive and organized, many people (myself included) budget our working hours in advance to accomplish tasks. By Monday at the latest I have a sense for what my schedule on Tuesday will look like, and what I need to accomplish on Tuesday to stay on top of my goals. I can try to budget some flexibility for the unexpected, but because I can't know what unexpected issues may come up, it is impossible to budget the right amount of time for them. There are many reasons why our plans might need to change. Some of those reasons are foreseeable or preventable, others are not.
When you ask a colleague to drop what they're doing to help you when it is convenient for you, you are asking them to compromise their work progress to further yours. It constitutes a preventable deviation from their planned workflow. Does this mean you can't ask a colleague for help? Of course it doesn't. You should, however, ask for help in a way that is mindful of your colleague's time. Requesting a meeting in advance means that your colleague can budget time in the future to help you, rather than needing to choose between helping you now and meeting their current goals. By requesting a meeting, you are asking for help in a way that is respectful of the other person's time (because you are not asking them to accommodate your schedule and compromise their own). You also allow them to prepare ahead of time as needed, which is to their benefit and yours (it makes the meeting more efficient).
Once a meeting is on the books, it's important for you to be on time to attend the meeting, and to give as much notice as possible if for any reason you need to reschedule. When you are late to a meeting that can't start without you, it signals to others involved that you do not value their time. (Of course, emergencies are the exception.) Aim to arrive early, and budget extra time if you can for factors that you can't control (like traffic).
If possible, you can ask for help from a knowledgeable person using Q&A communities (like StackExchange) or on social media (e.g., Twitter). These platforms allow knowledgeable users to respond to your question on their own time as they feel moved to help.
What if I can't request a meeting in advance?
If you must request help in the moment, give your colleague an out, or the opportunity to help at a later time. For example, ask "do you have some time to help me with [very brief description of the problem]?" Phrasing the question this way allows them to say no, or to find a time when they can help, whereas launching straight to the question ("How do I do x?") comes across as demanding. It assumes that the listener will drop what they're doing and help you right now.
Of course, emergencies do happen, and whoever you need to ask for help should be able to recognize the urgency of the situation. That being said, you need to be able to differentiate between personal work emergencies (e.g., "Oh shit, I had a week to get this done but I lost track of time and now it's due in 5 minutes, help!") and emergencies that affect the team (e.g., an equipment failure that must be reconciled now or everyone loses progress). Your colleague will be able to tell the difference, and will not be thrilled about "urgent" requests to help you with the former rather than the latter.
But what if it's a quick question?
If you don't know the answer to the question, or the solution to the problem, then you aren't in a position to gauge how long it will take your colleague to help.
Even if helping you would be quick, interruptions can be highly disruptive, especially for creative work (like writing or programming). Your colleague could lose their train of thought, forget what they were doing, lose their writing groove, their motivation, etc.
If you have to ask for help right then and there, ask in a way that is considerate, and don't argue with your colleague ("but it'll only take a second!") if they decline because they are busy.
Problem: Asking for help before troubleshooting yourself
There's a reason the site let me google that for you exists. If your colleague can use a search engine to answer your question, that means you could have done so as well, which would only have spent your own time rather than imposing on someone else's. You should always ask a computer for help first, because it won't resent you for asking (...that we know of). Relatedly, if there is a manual that could help you, you should read it before asking a colleague for help (per the tech adage "RTFM").
Oh, but I'm certain so-and-so knows how to fix it.
When you ask someone to give you their time before taking any time to figure it out yourself, you signal to them that their time is not as valuable as yours. Instead, try to solve the problem yourself first. If you can't solve it on your own, ask for help in a respectful way and explain what you have done to troubleshoot already. For example, "Do you have some time to help with [brief description of problem]? I tried [search query that you used] and [manual or other resource that you read] and none of the suggested solutions worked." If you tried asking for help in a Q&A community, you can offer to send them a link to the post. Communicating that you made a good faith effort before asking for your colleague's time will signal that you value their time.
The take-home message
You will encounter problems at work that you can't figure out on your own, and that will require help from a colleague. You can ask others for help, but you need to do it in a way that shows you respect their time. Communicate your request in advance, and be considerate.
This means that you ask in advance and schedule a meeting whenever possible, and that you give them an out when you ask. If you instead wait until they come to the office and ambush them with your problem, you signal to them that 1) you don't respect their own work plans, which you probably just upended, and 2) you consider your work, and therefore your time, to be more valuable than theirs.
When you make a meeting, stick to it, and be on time. Remember, they are making time to help you, and they can never get that time back. Relatedly, communicate in advance if you need to reschedule. Work on improving your time management skills if you have trouble sticking to a schedule.
Emergencies happen and are understandable exceptions. Whenever possible, take a moment before you ask for help to make sure that you have made a good faith effort to solve the problem yourself, and that you are considerate when you ask someone to give you their time. Doing so requires very little time and effort on your part, and will help your colleagues feel valued and respected.