It is the conditional perfect and used to describe a hypothetical situation in the past!
I would have been angry if he hadn’t called me.
I would have gone to the shop if we needed food.
You can use this when you are explaining your actions to someone or simply if you want to speak hypothetically!