The rules for processor precession are complicated and dependent on the specific context.
Broadly speaking, processors can be divided into two categories: those that add content and those that remove content. As a (very) general rule, you should apply effects that add content first and things that remove content after. For example, you'd normally place a distortion effect before a chorus or flanger. There are exceptions, of course, e.g. noise gates usually precede delays and reverbs.
Depending on their settings, compressors can fall into either category, and that's why there is no set rule for where they sit in the chain. It's not unusual to have two compressors bookending an effect placed between them.
EQ is also moveable. For example, a HPF usually makes more sense in front of a compressor because it's going to have a drastic impact on how the compressor reacts. But if you're using EQ to enhance the midrange, you'd probably want that to happen after compression. Similarly, if you're carving a spectral space for an instrument via cuts, it makes sense to do that last. And as with compression, you might even want two equalizers with an effect sandwiched between them, a not uncommon practice with reverb.
Hey, if it was easy everbody'd be doing it!