X-Ray Astronomy vs. Medical X-Rays
It's natural to associate the X-rays from cosmic objects with an X-ray from the doctor's office, but the comparison is a bit tricky. A doctor's X-ray machine consists of two parts: an X-ray source at one end, and a camera at the other. The arm or mouth or other body part to be examined is placed in between these two parts. X-rays from the source shine through the impeding body part, and the camera records the X-rays that reach the photographic film inside. Bone is denser than muscle tissue and skin, so it stops more of the X-rays (and hence fewer X-rays make it to the region of the film that's behind the bone). In the developed film negative, the bone looks lighter than the rest of the picture, since that part of the film was exposed to fewer X-rays.
There's much more space between the two ends of the system that allows us to make images of the X-ray emissions from cosmic objects. The cosmic object itself (such as a galaxy, or matter near a black hole) acts like the source in the doctor's machine, emitting X-rays on its own. On the other end, Chandra collects and records the X-rays shining into it -- like the camera on the X-ray machine. A Chandra X-ray image of, say, a galaxy gives an idea of how the galaxy is emitting X-rays, just like a photograph of the galaxy at visible wavelengths gives an idea of how the galaxy is emitting visible light. So could we photograph the source on an X-ray machine by simply eliminating the patient? It turns out the X-ray source is too close to the camera -- it illuminates the whole surface of the film uniformly, without any detail. (This is a good thing for the X-ray image -- it provides a smooth backdrop for the broken arm.)
So an X-ray machine can't act like Chandra and photograph an X-ray source. Chandra, however, can act like an X-ray machine and reveal information about what's between the source and the camera. Space is not empty, and there's bound to be material between us and a distant X-ray source -- perhaps a vast cloud of gas, or a disk of matter swirling into a black hole. Instead of blocking X-rays indiscriminately (like bone in an X-ray machine), these intervening objects absorb only particular wavelengths of X-ray radiation. By separating the X-ray light from the source into its component wavelengths and examining these absorption bands, we can learn about the matter between us and the X-ray source.
Chandra X-Ray Observatory Center