The illusion rests on two things: the folding triangular region with the "reverse side" color showing through, and a shadow along the crease. You clip a diagonal triangle from the corner (via clip-path or a separate layer), give it a color distinct from the front (the paper's back tone), and animate its size from zero up to the corner's diagonal length — that reads as the corner lifting and curling. Layering a gradient shadow (box-shadow or a linear-gradient) along the crease adds the sense of depth.
A true 3D curl — the page actually bending into a cylindrical surface — needs WebGL: the page is subdivided into a mesh and each vertex warped along a cylinder. CSS alone can't do that, but "triangle fold plus shadow" approximates the feel well enough that most e-book UIs use exactly this shortcut.
Overused, it invites the usual skeuomorphism complaint — the physical-object mimicry pulls more attention than the content itself. It's safest kept as a restrained corner hint, and only in reader apps where the page metaphor is actually meaningful.
When to use
Use it only where the "turning paper" metaphor actually fits the content — e-books, magazines. On ordinary web pagination it's excess decoration.