Trim is the control that adjusts the trim tab.
Effectively its a way to fine tune/change the control surface to elevate control forces. Since airplanes can be loaded differently and the Center Of Gravity moves as the aircraft burns fuel the control surfaces must be slightly adjusted for each flight/flight segment to achieve straight and level flight for a given configuration/load.
Wiki gives a nice description of it, this is for elevator control but the same applies for all control surface trim.
Elevator trim frees the pilot from exerting constant pressure on the
pitch controls. Instead, the pilot adjusts a longitudinal trim control
(often in the form of a wheel) to cancel out control forces for a
given airspeed / weight distribution. Typically, when this trim
control (wheel or lever) is rotated or moved forward, the nose is held
down; conversely, if the trim control is moved back, the tail becomes
"heavy". Many newer aircraft, especially jet aircraft, have electric
There is a nice article on it here as well as here
what situations I would use it for or how it's achieved.
The trim is generally adjusted any time the aircraft transitions flight phase (climb to cruise, cruise to decent etc) or when the power setting is changed or periodically in cruise if the CG is greatly effected. For example if you climb out at full power, reach your cruising altitude of 3000 ft. push the nose over and pull the power back to your cruise power setting you may find you are still applying forward control pressure to keep the airplane from climbing. In this case you would trim off the control pressure by rolling the wheel forward until you no longer needed to apply control pressure to keep the plane level. At this point you could fly "hands off".