"Have been" and "had been" are the present perfect continuous and past perfect continuous. "They HAVE been waiting" means that they started waiting in the past, and are still waiting. The action continues into the present. "They HAD been waiting" means that they started waiting in the past, and they are not waiting anymore — the entire action takes place in the past and is not in the present anymore. You will frequently hear the past perfect continuous ("had been") in a storytelling context, when talking about the past.
- I have been working for weeks, and I am so tired. (The action started in the past and continues into the present.)
- I had been working for weeks, and I was so tired. (This entire action takes place in the past. It sounds like I'm telling a story.)
"Has been" is just the 3rd person of the present perfect continuous — "She has been waiting a long time." Again, the action started in the past and continues into the present.