When you want to talk about two actions, and one action is in the past, and the other action is also in the past, but even "more past" than the first action, then the first past action is expressed with the past tense and the second past action, which happened before the first action, is expressed with the past perfect.
I sealed the envelope after I had placed the letter in it. = I