I have found all explanations of regaining Hit Dice after a short or long rest, but I can't seem to find at which point a character regains all their Hit Dice. Is it after a campaign? At leveling up? After some days of full rest?
After multiple Long Rests
To my knowledge, there are no effects which reliably recover all spent Hit Dice all at once. The primary way to recover Hit Dice is through taking a Long Rest—but you can only recover up to half your total Hit Dice per Long Rest.
At the end of a long rest, a character regains all lost hit points. The character also regains spent Hit Dice, up to a number of dice equal to half of the character's total number of them. You regain at least 1 Hit Die when you finish a long rest.
—Resting, Player's Handbook, pg. 186
So if a character has spent all their hit dice and wants to recover all of their spent hit dice, they will need to spend two (or possibly three, if they have an odd number of levels) Long Rests to fully recover all of their Hit Dice. It is all cumulative though, so if you've spent less than half your hit dice, a single Long Rest will recover all of your Hit Dice.