Nuclear forces are short range strong attractive forces that act between two proton-proton, neutron-proton and neutron-neutron pairs. Two protons have strong nuclear forces between them and also exert electrostatic repulsion on each other. However, electrostatic forces are long ranged and have very less effect as compared to the strong nuclear forces.So, in a nucleus (that is very small in dimension), there's no such significance of repulsive force as compared to the strong attractive nuclear force. On the other hand, an atom contains electrons revolving around its nucleus. These electrons are kept in their orbit by the strong electrostatic force that is exerted on them by the protons present inside the nucleus. Hence, a nucleus contains protons as well as neutrons.