We use the present perfect continuous (present perfect progressive) in two major cases.
1. It has been raining, the rain has just stopped, the grass is wet now
The activity started in the past and it has recently or just stopped. As a rule, we want to show the causal relationship between the activity and its result at the moment of speaking.
— Why are you out of breath? — I have been running. I started running some time ago. I've just stopped running. As a result, I'm out of breath now.
We have been playing volleyball for two hours. We are thirsty. We started playing two hours ago. As a result, after two hours of playing, we are thirsty.
Julie has been walking in the rain. Her clothes and her hair are wet now. The rain started some time ago. Julie has spent some time in the rain. As a result, she's wet.
2. It has been raining for two hours and it's still raining
The activity started in the past and it is still going on. We use the present perfect continuous to stress that the activity has been lasting for some time (some hours, days, years etc.).
Kate has been learning Spanish for three years. She started to learn it three years ago and she's still learning it.
Where are you? I've been waiting for you for half an hour! I started waiting half an hour ago and I'm still waiting.
We have you been working here for six months. We started working here six months ago and we're still working here.
How long, for, since
We often use the following "signal" words with the present perfect continuous:
— How long has it been raining? — It's been raining for two hours. It's been raining since noon.
— How long have you been playing the piano? — I've been playing it for five years. I've been playing it since I left school.