How is a proton beam separated into bunches in a particle accelerator? I was wondering how exactly is a proton beam separated into bunches, each at interval of ${25}\,$ns after the previous?
 A: The keyword here is Radio Frequency (RF) Gymnastics, while the fundamental concepts involved are found in the Longitudinal Dynamics chapter of any Accelerator Physics book. I will try to condense the whole chapter in a few words!
Let's consider a low energy machine uniformly filled with particles. Let's assume that the particles with higher energy go faster and take less time to make a turn (we are below Transition Energy). If somehow we manage to slowly (or adiabatically) perturb the energy of the particles according to their longitudinal position in the ring, we may be able to create a region of high-energy particles (tail) and another region of low-energy particles (head). According to what said above, both the tail and the head will then drift towards a central region, which is what we want, but then they will keep going crossing each other. So at this point to keep the beam bunched we have to keep decelerating its head and keep accelerating its tail. If we do this properly, we will get an oscillatory motion called Synchrotron Oscillation resulting in Phase Stability and the particles will be trapped around the center of the bunch.
Note that there can be more than one head and tail in the originally-uniform beam, according to the frequency of the perturbation. In this case more bunches are formed, their number being the harmonic number (otherwise computed dividing the frequency of the RF cavities by the beam revolution frequency).
If we then have more RF frequencies available in the machine we can go ahead and further split the bunches in smaller ones until the timing required by the next accelerator(s) is hit.
Quite funnily also the RF linacs, which do the very first acceleration, also require bunched beams to work. In this case the bunching is done at the source or by mean of a very special element right after it, called Radio Frequency Quadrupole (RFQ). Often this timing structure from the linac is kept all along the accelerator chain. Not at CERN though, as the various machines were built in different decades and were not at all intended to work together as the LHC injector!
