A single photo or illustration gets cut in Photoshop into foreground, midground, and background layers (the gaps left behind are patched with content-aware fill). Placed at different z-depths in After Effects' 3D space, these flat layers stack up like an actual set with real depth.
Add a camera layer and nudge it slightly — a truck-in, a pan — and the near layers swing much further across the frame than the far ones. It's the same principle as scroll parallax, just driven by a camera move instead of a scroll position. It's essentially an extension of the "Ken Burns effect" documentaries use to bring a still photo to life.
Push the camera too far and the gaps between cut-out layers start to show — the move only works within the range where those seams stay hidden.
When to use
Keep the camera move small — once the cut edges start to show, it stops looking like a 3D set and starts looking like a paper diorama.