erecting and dropping a perpendicular
You have a line and a point, and you want the line through that point that meets the first at a right angle. There are two flavours: the point sits ON the line (you 'erect' a perpendicular standing up from it), or the point is OFF the line (you 'drop' a perpendicular straight down onto it). Both are corners of every grid, every set square, every right-angle you ever draw — done here with compass and straightedge alone.
To erect a perpendicular at a point P on the line: open the compass and mark two points A and B on the line, equidistant from P on either side. Now P is the midpoint of AB, so the perpendicular bisector of AB is the line you want — swing equal arcs from A and B above the line, meet at R, and draw PR. To drop a perpendicular from a point P not on the line: centre at P and draw an arc cutting the line at A and B; then bisect AB. The foot, where the perpendicular meets the line, is the closest point on the line to P, and |PF| is the distance from the point to the line.
Perpendiculars are the workhorses behind altitudes of triangles, tangent lines (a tangent is perpendicular to the radius at the point of contact), coordinate axes, and squares. Both versions are really the perpendicular-bisector construction wearing a different hat: erecting makes P the midpoint, dropping creates a segment AB whose midpoint sits on the line.
Dropping a perpendicular from P to a line: arc from P cuts the line at A and B; the perpendicular bisector of AB passes through P and hits the line at the foot F, the nearest point of the line to P.
Both 'erecting' and 'dropping' a perpendicular reduce to the perpendicular-bisector construction.
Erecting (point on the line) and dropping (point off the line) are different starting positions but the same underlying construction. The foot of a dropped perpendicular gives the true distance from the point to the line — slanted segments to the line are all longer.