How does a Space Telescope work? (Hubble and Webb)

How does a Space Telescope work? (Hubble and Webb)