How are space telescopes stabilised to a perfect standstill? I assume that for space telescopes to get good images, they must be put in perfect standstill, as even the slightest deviation in the viewing angle is amplified by the distance of observed objects, results in observing a different area of space. How is this feat accomplished? How can you stabilize an instrument in space, so that it can take images of galaxies gazillion light years away? And how do you know you have succeeded, apart from getting quality imagery?
Pointing

In some ways it's easier to keep the direction that a telescope is pointing stable in orbit in space than it is on Earth. 


There's no wind Why is the opening in the Anglo-Australian Telescope's dome so small?
You aren't on a spinning planet requiring you to constantly move the telescope with electric motors and gears
there's no sagging due to gravity


There are tiny torques due to differential solar photon pressure on different parts of a space telescope, but these are small, very reproducible and can be learned, predicted, and compensated.

The James Webb Space Telescope has a giant sunshield that keeps the infrared telescope cold, and this can produce substantial torque. So it has a second reflector used to passively null out most of the torque. You can read more about it in answers to How will JWST manage solar pressure effects to maintain attitude and station keep it's unstable orbit?

In low Earth orbit (LEO) telescopes like Hubble will also experience tiny torques due to tidal forces; for example, one end of Hubble is in a higher or lower orbit than the other end. Without damping, this could cause it to slowly oscillate see this answer. Again, this will be small, very reproducible and can be learned, predicted, and compensated.

If you can somehow stop something in space from rotating, it will simply stay stopped and point in a stable direction, at least for a short time. If you can predict the torques due to solar pressure and gravitational tidal forces, you can apply tiny controlling torques to minimize those effects and it will stay pointed longer.

How?


Sensitive gyroscopes to measure tiny rates of rotation (inertial stabilization)
Watch the stars at the edge of the telescope's field of view, using them as guide stars


Both are shown in the image below, taken from Hubble Space Telescope Pointing Control System.

The objects labeled "Gyros" are gyroscopes used to measure tiny rates of rotation of the telescope and send those measurement to the attitude control system for the telescope. Systems can use real spinning wheels, or fiber optic rings with light going in both directions, or other techniques, but the result is the same.

Currently Hubble is working without all three gyroscopic sensors on-line because it has redundant systems: You can read more about that in Hubble Space Telescope Reduced-gyro control law design, implementation, and on-orbit performance

The objects labeled Fine Guidance Sensors use CCDs at the edge of the Hubble's field of view to track stars:


  The FGSs use starlight captured by the telescope’s mirrors to find and maintain a lock on guide stars to ensure that the spacecraft’s attitude does not change. One FGS can also be used as a scientific instrument to determine a star’s position with high accuracy. The level of stability and precision that the FGSs provide gives Hubble the ability to remain pointed at a target with no more than 0.007 arcsecond of deviation over extended periods of time. This is the same as holding a laser beam focused on Franklin D. Roosevelt’s head on a dime roughly 200 miles away — which is about the distance from Washington, D.C., to the Empire State Building in New York City — for 24 hours.


Feed this and other bits of information from other star cameras into the computer, combine it with the predicted torques from tidal forces and photon pressure, and the computer decides on a tiny correction torque necessary to keep it pointed stably. 

That message then goes to the objects labeled as Reaction Wheels. These are four heavy, spinning wheels whose angular momentum is balanced such that it normally applies no torque to the telescope. 

When the computer senses that a little torque is needed to keep the telescope pointed in the right direction, or to move it to a new field, motors on the spinning reaction wheels will speed them up or slow them down a little bit, and that will apply a compensating torque to the telescope.

Vibrations

Vibrations and oscillations of a space telescope's structure can also be a problem. These are addressed through very careful engineering and special materials. Structures are design to minimize vibration and oscillation by damping, isolation of moving parts (pumps, solar panels, etc.) and by use of light weight and stiff materials like silicon carbide to move resonant frequencies as high as possible where they are most easily damped and isolated. 

Silicon carbide is a very popular material in newer space telescopes and is found in the optical system of too man of them for me to remember, but here is mention of it in GAIA's optical bench answer and in New Horizion's LORRI telescope answer.

 

above: Gaya's Silicon Carbide Optical Bench, with the two objective mirrors of it's twin telescopes pointing 106.5° apart. From Spaceflight 101, image credit: ESA/Astrium.



above: The LORRI telescope is described for example in the ArXiv preprint Long-Range Reconnaissance Imager on New Horizons

below: From Hubble Space Telescope Pointing Control System