There are lots of different designs out there. Most work simply by venting muzzle pressure perpendicular to the bore line. Recoil consists of Newton's equal and opposite reaction to accelerating the bullet, plus thd equal and opposite reaction to accelerating about half the powder mass, as gas, forward with the bullet, plus the equal and opposite reaction to rapid acceleration of the gas mass to even greater velocity than the bullet as muzzle blast. That last part is called rocket effect or post-muzzle effect. It is the barrel acting as the nozzle for an impulse rocket like the smaller blank-powered one employed by astronauts on space walks.
Basically, the more powder mass you started with and the higher the remaining pressure at the muzzle when the bullet clears it, the more powerful that rocket impulse is. It is most of the reason achieving a given bullet velocity with a heavier charge weight of slower powder will produce more recoil than achieving the same velocity with the same bullet using a lighter charge of a faster powder. The only problem is the faster powder will produce a higher peak pressure to get there, so there isn't always a safe substitution available.
When the brake vents the muzzle gas just before the bullet exits, then it simply depletes the source of the rocket impulse. Since that can be responsible for half the recoil in a high pressure, slow powder charge, the effect is noticeable.
You can expect that the bigger the vents and the less gas a brake allows to escape forward around the bullet, the better it will work.
There are a few muzzle brakes, like the .50 BMG clamshells that actually direct a portion of that lateral blast rearward. That jet action will actually push forward on the muzzle in addition to mitigating rocket effect, and can thereby reduce recoil still more. Of course, it also is directing more sound rearward, so it is loud.