The difference in potential between the two Ds of a cyclotron accelerate the particles across the gap. The direction of potential difference switches every half cycle to keep the particles accelerating. The magnetic field is a right angles to the path of the particles so keeps them in a circular motion within the Ds. As the particles gain energy and become faster the path radius increases until they are released as a beam when the energy is high enough.