it accelerates particles, usually electrons, protons or neutrons. While the final speed (they will reach near speed of light anyway) is not the relevant features, their energy is.
Those particles are then used for high-energy collisions with other particles or targets. This is rather violent and rips their internal structure apart. Then those fragments are studied, they give a short glimpse at how particles are built inside.
You might have heard about E=mc^2 and how that means you can convert a tiny amount of mass into a huge amount of energy, and how this is used to devastating effect in atomic bombs.
Particle accelerators essentially do the opposite: they cram a huge amount of energy into a tiny space, in the hopes that some of it will turn into the mass of interesting new particles.
When we speed up particles, we’re giving them kinetic energy. When they collide, they release this energy and can create all kinds of things. Its not just smashing them open to see what’s inside, it really is creating new stuff from nothing but pure energy.
That’s why we need really powerful accelerators to find new particles: really massive particles take a lot of energy to make, and really weakly interacting particles are only produced very rarely, so you have to smash many many times before one shows up, and your detectors have to be good enough to notice it amongst all the common, boring, particles produced by the other collisions.