The third conditional

The Third Conditional is formed by if + past perfect, ...would + have + past participle

It talks about the past. It's used to describe a situation that didn't happen, and to imagine the result of this situation.