These particles are likely to be protons. The change in behaviour from attraction to repulsion is due to the nuclear force and the electromagnetic force.
Initially, when the protons are close together (at a distance 'd'), the strong nuclear force, which is attractive, overcomes the electromagnetic repulsion between the positively charged protons. However, as the protons move farther apart (beyond a certain distance), the strong nuclear force diminishes because it acts only over short distances and the electromagnetic repulsion dominates as the distance between the protons increases.