Tabs have little or nothing to do with mass balancing - they're all to do with changing the relationship between various aerodynamic forces on a control surface.
A balance or spring tab is designed to deflect in the opposite direction to the desired surface movement. Because it's further back from the hingeline, a small force on the tab has a proportionally larger moment, which changes the "float" angle of the surface - where it would be if no force were applied to the surface itself.
The surface may be controlled ONLY through the tabs - pilot applies force to tab, tab moves, control surface moves in response to tab movement - or the tabs may be used to unload the control surface hinge memonts, making it easier for a manual control to be used.
Trim tabs work aerodynamically exactly the same way; the only difference is that a pilot will have direct control over a trim tab, through whatever the trim control is (wheel or switch) whereas the balance/spring tab isn't necessarily directly controlled.
There's also a "fixed" tab, which is like a trim tab (used to rebalance the aero forces) but it's only adjustable as a maintenance item, and it used to take out any trim offsets due to aircraft asymmetry at the build stage.