If you fly with a well trimmed aircraft, and you change the power setting without moving the controls, the new speed you will end at will be the same on a theoretical aircraft.
The theoretical aircraft I'm talking about keeps the same angle of attack whatever the power is (this is very simplified).
That is why a theoretical instructor might say that trim controls the speed.
On a real aircraft, things are different.
For instance, on a 172, speed will increase a bit if you reduce the power, and decrease in you increase the power. That is why when you go around on a 172, you must, if you start from a well trimmed descend at almost idle, push on the control when you apply full power, and retrim.