X-ray imaging uses electromagnetic radiation to produce images of the inside of the body. It is often used to detect bone cancers and to identify lung cancers. However, X-rays have limitations in soft tissue contrast and may not detect smaller tumors effectively.