Effects and transformations are all applied top to bottom. Select a layer with a bunch of effects and animations applied, press the U key twice and observe the modified properties. Start at the top and that's how things are processed.
Some effects ignore transformations, some ignore masks. It depends on the effect. This stack animates a mask on a white solid that looks like the wing of a bird, generates the particles on the outside of the mask, then twists the particles outside the mask and the hole around the mesh, then the whole layer moves and scales over time producing a rotating vortex surrounding a morphing bird shape that follows a motion path. Change the order of the effects and the illusion of a twisting vortex of particles goes away.
If you need to force something to happen in a different order or be applied around a mask there are compositing options in the timeline at the bottom of the effect controls for each effect. if that does not give you the rendering order that you need then you pre-compose the layer and apply the effect or transformation or mask that needs to be applied to the nested comp.
Layers are also processed from top to bottom with the top layers showing up on top. Track mattes are above the layers they mask. Adjustment layers are above the layers they adjust. It's easy to assume that the bottom layers are rendered first and stacked on top of each layers in the same way you would deal a deck of cards but this is not entirely accurate. Starting at the bottom then adding the layer above would result in an infinite loop of calculations so AE, and all compositing apps that I know of look at the top pixels first then figure out how they effect the layers below them.
I hope this clears things up.
Thank you very much Rick for your detailed explanation! The matter is much clearer to me now