It reduces free recoil.
The gasses that push the bullet out of the barrel weigh just as much as the gunpowder that generated those gasses. In high velocity magnum rounds, those gasses can weigh half as much as the bullet. In some of the more extreme high velocity varmint rounds, the gasses can actually approach the weight of the bullet.
A muzzle brake redirects a large portion of those gasses rearwards so that they cancel some of the recoil instead of adding to it. Think of it as a semi-recoil-less rifle.
The downside is that instead of bruising your shoulder, the rifle deafens your ears. You'll need ear plugs AND ear muffs at the range. The people shooting from a bench next to you will hate you.
Muzzle brakes are less effective on low velocity heavy bullet guns like .45-70 and shotguns because the powder weighs so little and the bullet weighs so much.
Some states are coming to their senses and are starting to allow hunting with silencers, which are essentially muffled muzzle brakes. Saves your shoulder and your ears.