A large hadron collider is one of the largest machines in the world, where particles are collided nearly at the speed of light. This large hadron collider is located in Geneva at the border of France and Switzerland 175m beneath the surface and 27km in circumference. It takes place in typically 5 stages. In the firststage, gas of hydrogen is taken and fed in a precisely controlled way into the accelerator called linac 2, where electrons are stripped off leaving with the nuclei of hydrogen atom which is a proton, they are accelerated using electric field, by the time these particles leave linac 2 it would be travelling 1/3rd the speed of light, then it enters stage 2. In order to maximize the intensity of beam, the packet is divided into 4 divisions in the booster rings, now protons travel in a linear fashion but here in order to bend proton beam, magnets are introduced at right angles to the direction of motion.
Booster accelerates protons to 91.6% the speed of light then these 4 rings of protons are recombined and flung to the proton synchrotron. The third stage of LHC, it is 628m in circumference, here proton reaches 99.9% the speed of light. Further increase in rotation will not increase the speed of proton but increases the mass of proton. Now the proton is having an energy of 25giga electron volts and weigh 25 times when they are at rest, it is next sent into stage 4.A super proton synchrotron 7km in circumference, whose work is to increase proton energy to 450giga electron volts. This is sufficient to launch the electron to the orbit of LHC, which is the largest ring having circumference of 27km.
There are 2 vaccum pipes where the proton are circulated in opposite direction, one in clockwise and one in anticlockwise and are made to collide here. The energy of proton will be 7tera electron volts and are 7000 times heavier than protons at rest.To achieve such enormous speed and motion of proton, enormous magnetic field is required which is achieved by making LHC colder than outer space, so that the magnets become superconducting when the protons are collided. There will be detectors which record the traces of particles. This is how an LHC works and by learning the behavior of particles, fundamental mysteries of universe can be solved.