There are three basic factors that you need in order to produce an X-ray. These are done through the actions of the anode, which is the positive side of the X-ray tube and the cathode which is the negative side of the X-ray tube. The first factor that you need is a source of electrons. This is provided by the cathode heating up electrons until they are boiled off.
The next part that you will need is a rapid moving steam of electrons. This is where the electrons are being fired off at a very high speed form the cathode to strike the anode. This stream of electrons is directly proportional to the amount of mA that the control panel is set to and the speed at which they are going is directly proportional to the kVp that is being set on the control panel.

Finally, the last thing that is needed for the production of an X-ray is the electrons to come to a very sudden stop. This causes the electrons to strike the anode and either create a characteristic X-ray photon or a bremsstrahlung photon. The anode acts as the stopping mechanism for the final step of creating an X-ray photon.