system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5 Why are MRI machine so loud?

Whenever I take an MRI there are always a ton of weird sounds and lots of noise. Why and where do they come from?
gpt
An MRI scanner contains a huge magnet. However, to make images, it has to alter the magnetic field. 

If you couldn't alter the magnetic field, you could only "see" 1 pixel. So to make an image, you need to warp the magnetic field to focus on a different region and then change the focus, so you get multiple pixels (actually, it's more complicated than that, but that's good enough for ELI5).

So, to warp the magnetic field in a controlled way, you need an electromagnet.  Two magnets may attract or repel, depending on their alignment, so the controllable electromagnet gets attracted or repelled from the main magnet. 

This is exactly what happens in a loudspeaker. You have a permanent magnet, and an electromagnet. The electromagnet is connected to the loudspeaker cone, and the force on the electromagnet gets transmitted to the cone.

In an MRI scanner, the electromagnet isn't connected to a cone, but because the forces on it are so huge (many tons) that it actually causes vibrations through the whole body of the scanner and magnet, so effectively the whole body of the scanner acts like a giant loudspeaker.

You get different sounds according to what particular type of scan is being performed. Some scans are down a row of pixels at a time, then there is a rest period of a second or so, so that the magnetization of the tissue being scanned can reset - these give a clunk...clunk...clunk.. sound, as there is a strong vibration as the magnetic field is warped to start a line. Some scans need to be done much faster, to the magnetic field is swept backwards and forwards without a rest period, this causes a beeping sound, as the warp magnets get a sine wave signal.