Draw a line l and point X on it. Through X, draw a line segment perpendicular to l.
Now draw a perpendicular to at Y. (use ruler and compasses)