X-rays are produced when electrons transition between energy levels in the inner shells of atoms or when charged particles are decelerated rapidly (bremsstrahlung). The question specifically refers to electron transitions from outer to inner orbits, which is a mechanism for characteristic X-ray emission.