The past perfect tense is used to describe events that occurred before other past events. It establishes that one past action was completed before another action in the past took place, regardless of the order used to mention the events. The past perfect is formed using had + past participle and can be used with "just" to refer to an event that happened a short time earlier than another past event.