The tone of electric instruments, especially distorted guitar, is driven by harmonic saturation.
Consider a sine wave at 440 hz. There is no harmonic complexity, only a single tone. Compare that sound to a plucked A string on an instrument, and the plucked string contains a greater variety of frequencies, creating a more complex sound. Different instruments are described as 'full' or 'tinny' because of what harmonics they emphasize, and whether that harmonic content is pleasing. The wikipedia about the harmonic series has a physics-oriented description of how this harmonic content is created by vibrating objects.
To create a richer, thicker, and then distorted tone, the first thing we want to do is increase the volume of the harmonic content, so that many frequencies are prominent. This is what is usually meant by a 'boost' or 'drive' pedal. Compressors can also have this effect by reducing the volume of the fundamental frequency, so the upper harmonics are easier to hear.
The next step is to create 'clipping' in the wave forms. When a frequency reaches the maximum possible amplitude for a stage in the circuit, it will flatten out. If you have a synthesizer, try creating a sine wave, and then a square wave at the same frequency. This will give you a sense of how the two waveforms sound different.
Distorted guitar sounds are a complex waveform, with a lot of upper harmonic content, and lots of clipping. If you record your guitar, you can see that the waveform almost looks like a rectangle. That is clipping and harmonic saturation in action. If you want to play metal guitar use 'boost' or 'drive' pedals to increase the harmonic saturation and create clipping, and then EQ sound that the pleasing parts of the harmonic content are emphasized. Changing the order of the effects will influence the final sound. If you put an EQ with a big bump to the mid frequencies before a distortion, then you will get more aggressive clipping in that frequency range, because more of the waveform will hit the maximum possible amplitude.