Let’s take an example

Given a line
l
with point P not on it

With P as center, and any radius,
draw an arc intersecting the line at points A and B

Now with A as center, and
same radius
draw an arc.
With B as center, and same radius as before, draw an arc
 Mark the point of intersection of the two arcs as point Q
Join P & Q.
∴ PQ is the line perpendicular to line l