What is the equivalent of past perfect continuous (eg. I had been working) in Italian? And how (or when) do you use it?
There isn't really an equivalent, it may be translated with the trapassato prossimo or the construction [imperfetto of "stare" + gerundio of the verb at issue] depending on the context. Let's see some examples.
Consider the sentence "I had been working on the problem for several hours, I needed a break". In Italian this becomes "Avevo lavorato al problema per diverse ore, avevo bisogno di una pausa", or "Stavo lavorando al problema da diverse ore, avevo bisogno di una pausa".
Borrowing from this page, "Had you been waiting long before the taxi arrived?" translates to "Avevi aspettato tanto prima che il taxi arrivasse?" similarly to the first example.
Instead, "Her friends had been thinking of calling the police when she walked in" translates to "I suoi amici stavano pensando di chiamare la polizia quando è entrata/entrò".
The last example is different because it is highlighted that the action was interrupted by another action, whereas in the other two the action was continuous for a prolonged period of time. The sentence "We had been trying to open the door for five minutes when Jane found her key" is somewhat between the two cases, it should be translated as "Avevamo tentato di aprire la porta per cinque minuti quando Jane trovò la chiave" or as "Stavamo tentando di aprire la porta da cinque minuti quando Jane trovò la chiave".
Note that the trapassato prossimo can also translate the past perfect, and the aforementioned construction with stare can also translate the past continuous.
This question is not about the Italian language, but instead about the difference with English. So to answer this, one should have a very good knowledge of English. I am not sure the answer above is completely correct in the translation from English.
"Had you been waiting long before the taxi arrived?" translates to "Avevi aspettato tanto prima che il taxi arrivasse?" similarly to the first example.
I would translate this instead "Stavi aspettando da molto quando il taxi è arrivato?" because emphasizes better an action which started in the past, and continued from the past till the moment the taxi arrived.