What do you use when you try to save your ally who is being grappled? For example the evil boss is currently grappling Bob the Wizard and Mark the Barbarian wants to tackle the evil boss in order to free the wizard?Also if possible write down whether the same thing applies when the person is pinned.
As listed in the Grapple rules for Multiple Creatures (highlight mine)
Multiple creatures can attempt to grapple one target. The creature that first initiates the grapple is the only one that makes a check, with a +2 bonus for each creature that assists in the grapple (using the Aid Another action). Multiple creatures can also assist another creature in breaking free from a grapple, with each creature that assists (using the Aid Another action) granting a +2 bonus on the grappled creature’s combat maneuver check.
The highlighted portion is the only option Mark has to directly help Bob with the Grapple. Alternatively, Mark could try to Grapple the evil boss, who would suffer the penalties of the Grappled condition (mainly, the -4 to Dex, which would lower his Combat Maneuver Defense by 2). The evil boss would then have the option of letting go of Bob to concentrate on Mark, or to keep trying to Pin Bob. Lastly, Mark could just keep hitting the evil boss, who will likely also have a lower AC, thanks to the same penalty.
If Bob is Pinned by the evil boss, Mark has much the same options to assist, although Bob's chance of escape, even with assistance, will likely be even lower because of the Pinned condition (denied his Dex Bonus).
You can use the Aid Another action, but that is probably your worst idea in that situation (other than freaking out and running away). A smart barbarian (I know, I know), would just smash the head of the evil boss before he has the chance to cause any real damage on his wizard friend.
You need two hands to grapple, so a better option would probably grapple the boss so he loses a free hand and take -4 on his grapple check. The next round you pin the boss (See the Pinned condition) and he has to release his own grapple on the wizard.
Humanoid creatures without two free hands attempting to grapple a foe take a –4 penalty on the combat maneuver roll.
Even simpler would be to move the boss so they have to release the grapple, as they cannot move their own target out of their turn. This can be done as part of your grapple action to maintain the hold, or using a bullrush maneuver to push him away. Since they cannot grapple outside their reach, their next grapple maneuver automatically fails.