The "regular" past tense is called the "simple" past, while the "other" past tense is called the "past perfect."
Whenever you use "had" + "past participle," you are using the past perfect tense.
Example:
1. I ate the cake yesterday. (simple past)
2. I had just eaten all the cake when the doorbell rang. (past perfect)
In the first example, you can see that one thing only happened in the past: I ate.
In the second example, however, two events happened in the past:
1. I ate the cake.
and:
2. The doorbell rang.
Because eating the cake happened before the doorbell rang, I place it in the past perfect tense.
In other words, you use the past perfect when you want to make it clear that one event in the past happened before another event in the past.
If you do not use the past perfect in the example above, the meaning of the sentence changes.
Compare the following:
1. I had just eaten all the cake when the doorbell rang.
and:
2. I ate the cake when the doorbell rang.
Please let me know if this makes sense.