The shortest way from a point to a plane is always the perpendicular one — here it is, drawn.
Cross the plane and the signed number changes sign — that is how a plane divides space into two sides.
Slide the point around and watch the perpendicular follow it.
A plane is easiest to describe not by the points in it but by the direction perpendicular to it. Pick any point Q on the plane and a normal n; then a point P is on the plane exactly when n · (P − Q) = 0. That is the dot product's perpendicularity test doing all the work.
Distance falls straight out of the same expression. The vector from Q to P generally leans; only the part of it along n takes you away from the plane, and that part is the projection. So the distance is |n · (P − Q)| / |n| — the shadow of the offset on the normal. The drawn perpendicular is that shadow, made visible.
The signed version, before the absolute value, is worth keeping. It is positive on the side the normal points to and negative on the other, so the plane cleanly divides space in two. Slide the point through and watch it flip.
For the line the story is the mirror image. There you want the piece of the offset that is perpendicular to the direction rather than parallel to it — so you subtract off the projection instead of keeping it, and what is left over is the distance.