They say that every person is liable for their good and bad deeds on the day of resurrection. So when a person will be punished on that day then what punishment does he gets in barzakh? What happens to him in barzakh?

Barzakh means barrier between this world and the next world.

For those who have answered the questions in the grave correctly, they would go to a state of bliss if they have done righteous deeds and go for a mini punishment if they did evil deeds.

This is due to the fact that Allah wants the believer to be honoured on the day of judgement and not punished.