In X-ray tube, when high speed electrons strike the target, they move into the target. They lose their kinetic energy and come to rest inside the solid. The electron because of finally being stopped makes several collisions with the atoms in the target. At every collision one of the given two parts of X-rays may get form.