The basic idea is this. Suppose you have a first-order differential equation
This DE defines the slope of the curve y(x). It is known that, given a straight line with slope m, the slope of the perpendicular line is -1/m. So, the family of curves that are orthogonal to the solutions of the DE above are going to satisfy the following DE:
You can see Zill's A First Course in Differential Equations with Modeling Applications for a problem or two involving orthogonal trajectories. Just look it up in the index. Also check out pages 117-118 of Tenenbaum and Pollard's Ordinary Differential Equations.