This video from Smarter Every Day explains how the space telescopes are able to change the direction they are pointed at. some solutions involve a less elegant method like using small rockets, but others are more than clever.
It turn out that is quite hard to point a telescope like Hubble to where it should look at when there is no external force that can be applied to it.
An elegant solution is to use three torque rods (rods with wires around them that make an coil), places at 90 degrees one from each other. Those torque rods would interact with Earths magnetic field and they would help point the space telescope in the right direction.
Another, yet more pleasing solution is to use the physics of flipping cats. Cats are able to always land on their feet by twisting half of their bode in opposite direction from the other half, thus cancelling the angular momentum (normally it should rotate once it starts rotating while it is falling).
The system used is called nonholonomic and uses 4 reaction wheels. These wheels are rotating and, if a rotation is needed, the engineers know how to sped up or slowed down such a wheel in order to obtain a change in the angle of the satellite. Or you could use a Control Moment Gyro.