An X-ray is a procedure in radiology that consists of using highly ionized radiation produced by shooting electrons at a metal target to expose film after the radiation has passed through a patient's body. Generally speaking, the harder and denser the tissues, the harder it is for X-rays to penetrate them. As such, X-rays passing through structures like bone and metal will not expose the film, while normal body tissues allows X-rays to pass right through to expose the film. William Roentgen discovered X-rays in the late 19th century and immediately realized their application for medical diagnostics. He won the first Nobel Prize in Physics in 1901 for his discovery.
X-rays are very dangerous, both to the patient and to personnel who work with the equipment. Procedures must be taken to protect both the patient and operators from accidental or lengthy exposure. Extended exposure to X-rays can lead to sterility, burns, and even radiation sickness. Modern X-ray machines have precise timing to prevent anything more than minimal exposure to the patient, which is usually all that is required. Operators usually have to wear protective equipment, such as lead aprons, or work behind shielding.
A CT scan uses X-rays that are more directed and are picked up by electronic sensors rather than film. Mammography machines also use X-rays.
Reading an X-ray can be difficult. As was shown in one episode, House caught the fact that Chase did not do an X-ray himself by noting that the X-ray showed the wrong foot. Moreover, properly reading X-rays requires a great deal of training as the details that the physician must see are often incredibly subtle.
X-rays are so dangerous that pregnant women cannot be exposed to them because of the risk of damage to the growing fetus. For this reason, technologies such as ultrasound and MRIs have to be used.