A neutron will naturally decay (~ 10 minute half-life) into a proton and an electron (and some neutrino). Reverse the process and viola!
Or, if you have some electrons with energies > 17 MeV or so, if they hit stainless steel (for example), neutrons will be emitted. It's probably a case where the electron creates a shower of stuff, including gammas, the gamma is absorbed in one of the atoms of SS, and a neutron is emitted. This is why hospitals that do radiation therapy keep the high-voltage on the x-ray machines below 17 MeV.
The neutrons are more dangerous than the x-rays since they cannot be easily shielded and the biological damage from them is higher than for photons.