Draw a square with a straightedge and compasses
Draw a line from A to B using a straightedge.
Extend the line to X.
Centre your compasses on A. Fix them to a width less than AX.
Draw a circle cutting the line at Y and Z.
Centre your compasses on Y and Z, use the same width, draw 2 circles.
Draw a line MN through where the 2 circles cross each other (intersect.)
Centre the compasses at A, width AB. Make a circle to cut MN at D.
In the same way as you made a perpendicular at A, make one at B.
With your straightedge draw a line from  D to C.
Presto! You have constructed a square ABCD: the edges are all the same length, the angles are all 90 degrees.
Geometry: using only compasses and straightedge