Light bends twice going through a glass slab — once in, once out — and the two bends exactly cancel each other's angle, just shifting the ray sideways.
The dashed line shows the undeviated path — the gap between it and the real emergent ray is the lateral shift.
When light enters a rectangular glass slab, it refracts once at the first surface (air to glass, bending towards the normal) and again at the second surface (glass to air, bending away from the normal, by the same amount).
Because the two surfaces of the slab are parallel to each other, these two bends are equal and opposite — so the ray that finally emerges is travelling in exactly the same direction as the ray that went in. It isn't rotated at all.
However, the emergent ray isn't sitting on the same line as the incident ray — it's shifted sideways slightly. This sideways shift is called lateral displacement, and it's exactly why letters under a glass slab look raised, or why the line under a slab appears to jump sideways at the edges.
Key exam points
Watch it explained
Refraction Through Glass Slab — Lateral Shift, Derivation and Explanation · CBSE Physics