Trim is used to allow an aircraft to fly at a desired attitude and airspeed without constant control inputs from the pilot.
Most simple single-engine aircraft are equipped only for "Pitch" (or elevator) trim. More advanced aircraft have trims for "Roll" (Ailerons) and "Yaw" (Rudder).
Using Pitch trim, you can configure the aircraft to Climb, Fly Level, or Descend.
A trim setting is only good for a specific "Thrust" (power or throttle) setting. Changing the Thrust setting will result in a different flying Attitude.
For example, upon takeoff I set the power at 25" Manifold Pressure (MAP) & 2500 (Propellor) Rpm at an Indicated Airspeed (IA) of 80 Knots . I trim for a 1000 Ft/Min climb and fly "hands-off" to my cruising Altitude of 5000 Ft.
Upon reaching my desired Alt, I use the Pitch trim (elevator down) to hold the nose down and maintain a level attitude. As the aircraft accelerates I have to periodically re-trim or the aircraft will try to climb rather than increase speed. Without changing the power setting the aircraft will accelerate to it's cruising speed of 150 kts.
After reaching my desired cruise speed, I reduce the MAP to 22" and the Prop to 2200 RPM to save fuel. A last re-trim of the pitch (probably nose-up) and I cruise to my destination at 150 kts.
As I near my destination I decide to descend, so I reduce my power to 20" MAP. With less power available, the aircraft seeks equilibrium and begins to descend and slow so I re-trim nose-down to indicate 150 kts and a 500 FPM descent.
The thing to remember about using trim and about flying in general, is that all the controls act together to acheive the desired result, and that changing any one control setting (Thrust, Roll, Yaw, or Pitch) will affect one or more of the others, and will require some input by the pilot to maintain the desired Attitude or Airspeed.
CptA