It is due to the residual of the strong force between the quarks inside the nucleons. As a comparison, think of the Van der Waals force in fluids: it is the residual of the electromagnetic force after electrons and nuclei mutually neutralize each other. Something is still left, basically due to the fact that the opposite charges do not lay in exactly the same position. Well, inside a nucleon the three quarks mutually neutralize their "color" force (the strong one), but something is still left acting on a longer range. That is the nuclear force, it is much weaker than the strong force but... do not confuse it with the weak interaction, which is another thing completely.
If I am not wrong your question is about nuclear structure and not nucleon structure. Generally, when we treat the problem of stable nuclei we are concerned with nucleon-nucleon interactions and also three-body interactions. For nucleon-nucleon interactions, the well-known forces are: central, tensor, spin-orbit and quadratic spin-orbit. Some of them are chosen to fit the ground state characteristics of deuteron. Others for the helium nucleus. The radial dependence of them can be taken as: Youkawa or Gaussian. For more details, please see
John Dirk Walecka, Theoretical Nuclear and Subnuclear Physics, World Scientific (2004).