The images produced by X-rays are due to the different absorption rates of different tissues. Fat and other soft tissues absorb less, and look gray.
Air absorbs the least, so lungs look black on a radiograph.
For instance, chest radiographs are sometimes used to see if cancer has spread to the lungs or other areas in the chest. However a radiograph and a CT scan show different types of information. An arm or chest radiograph looks all the way through a body without being able to tell how deep anything is. A CT scan is three-dimensional.