Wilhelm Roentgen discovered x-rays in 1895 while studying cathode rays. He observed that a mysterious type of radiation was produced when electrons interacted with glass that could pass through objects and be detected outside the tube. X-rays are produced when high-energy electrons generated by an x-ray tube strike a metal target. They have properties such as being invisible, having no mass, and being able to pass through soft tissue but be absorbed by bone and metal. X-rays are used in medical imaging due to these properties allowing visualization of internal structures.