X-rays are a type of electromagnetic radiation produced when electrons interact with matter. The most common method of producing x-rays involves accelerating electrons towards a target using high voltage. When the electrons strike the target, two types of x-rays are produced: continuous x-rays due to electrons losing kinetic energy, and characteristic or line x-rays due to electrons knocking inner electrons out of target atoms which emit photons as outer electrons fill the vacancies. X-rays have various applications including use in medicine for diagnosis and treatment of conditions like broken bones or cancers.