A short answer, is that to estimate interaction energy (which says if same charges attract or repel), you use propagators. Propagators come from the expression of Lagrangians. Finally, the time derivative part for dynamical freedom degrees in the action must be positive, and this has a consequence on the sign of the Lagrangian.
Choose a metrics $(1,-1,-1,-1)$
For instance, for scalar field (spin-0), we have ($i=1,2,3$ representing the spatial coordinate) the : $$S = \int d^4x ~(\partial_0 \Phi\partial^0 \Phi+\partial_i \Phi\partial^i \Phi)$$
Here, the time derivative part of the action is positive (because $g_{00}=1$), so all is OK.
When we calculate energy interaction for particles wich interact via a spin-0 field, one finds that same charges attract each other.
Now, take a spin-1 Lagrangian (electromagnetism):
$$S \sim \int d^4x ~(\partial_\mu A_\nu - \partial_\nu A_\mu) (\partial^\mu A^\nu - \partial^\nu A^\mu)$$
The dynamical degrees of freedom are (some of) the spatial components $A_i$, so the time derivative of the dynamical degrees of freedom is :
$$S \sim \int d^4x ~\partial_0 A_i \partial^0 A^i$$
Now, there is a problem, because this is negative (because $g_{ii} = -1$), so to have the correct action, you must add a minus sign :
$$S \sim -\int d^4x ~ (\partial_\mu A_\nu - \partial_\nu A_\mu) (\partial^\mu A^\nu - \partial^\nu A^\mu)$$
This sign has a direct consequence on the propagators, and it has a direct consequence on interaction energy, which is calculated from propagators.
This explains while same charges interacting via a spin-0 (or spin-2) field attract, while same charges interacting via a spin-1 field repel.
See Zee (Quantum Field Theory in a nutshell), Chapter 1.5, for a complete discussion.
Not really an answer, but rather some organized comments.
First, you may become disappointed but the trully fundamental laws, as we know them today, are not written in terms of force laws. Even though the concept of force is still present
in Physics, it is not used in the way it was before and which seems to be the way you are thinking about them.
Force is nowadays synonymous of interaction and one does not seek for force laws to be used in the equation
\begin{equation}\vec{F}=\frac{d\vec{p}}{dt},\end{equation}
from where one would, ultimately obtain $\vec{r}(t)$.
The above equation summarizes classical mechanics (CM) in its Newtonian "version" (or formulation). Even classical mechanics can be done without explicitly writing a vector equation as this one.
It was the analytic formulation(s) of CM that people took as the framework for doing advances in mechanics. They are all equivalent when it comes to the classical scenario and one uses one or another formulation for several reasons. Nevertheless, in the analytic formulations of CM, instead of using forces, as the quantities encoding the interaction, one uses potentials and the equations of motion are no longer obtained from Newton's second law (at least not explicitly as in the equation above) but from a more powerful principle, which is Hamilton's principle.
Now, even though in CM one may use any formulation according to one's needs, when it comes to relativistic classical mechanics and (relativistic) quantum mechanics, it is no longer a matter of choice. There are several reasons for why this is so. A very simple one, is that will won't be able to find a force four-vector to plug in the relativistic equivalent of Newton's second law (as it is written above) other than the Lorentz force. Also, in quantum mechanics (QM), Newton's second law holds only as an average (or expectation value).
This is why, even though one still speaks about forces, it is not in the same sense as before and we don't have other kinds of inverse-distance laws (or any other kind of vetor force laws) for the other fundamental interactions. Even the so-called potentials are not quite the same animals as in CM.
About What laws govern the fundamental forces of nature?, have a look at here.
Even the problems we try to solve with more fundamental physics are not quite the same as in CM. It is more about cross sections and decay rates than about describing the motion of individual particles (though that can be done to some extent).
I believe the particular phenomenon you are interested in is nuclear fusion. It is ultimately described in terms of electromagnetic and strong interactions and, even though in practice people may describe it in terms of more effective nuclear forces, it is still all done in the framework of relativistic quantum mechanics / quantum field theory and you won't find force laws.
To summarize: there are no force laws aside the ones of classical physics (Newton's gravitation law, Coulomb's electrostatic force and Lorentz force and some others).
I hope my comments help you.
Best Answer
Your teacher might be referring to this article:
Ball (2012), Nature News: Like attracts like?