My first piece of advice is that there is very little difference so don't worry much about this until you are an advanced speaker. It is enough to be able to recognize that both are past tense. Was/were, has/have been, and had been mean almost the same thing.
Now, to answer your question, I'll offer a couple of examples.
I have been to that bar many times. (you went there before and you could go again now or in the future)
I had been to that bar many times before it closed. (you went there before but not anymore)
A real English teacher can explain this better than I can but I think that it's not really important. I have trouble deciding which form of the verb to use sometimes.