You are correct about electrons. They are levels of energy (photon) bound to atoms by the charge in protons. Inverse beta decay (electron capture) is one way neutrons can be formed. My explanation was a simplification of the fusion processes in a star. You really need a physicist to go any deeper into this topic. I only studied physics in 1st year university but maintain a general interest.