We look, for example, at the ellipse with equation $\frac{x^2}{a^2}+\frac{y^2}{b^2}=1.$ We would like to find the tangent lines with given slope $m$.
Such a line will have equation of the shape $y=mx+k$. Substitute in the equation of the ellipse. After a little simplification, we get $(b^2+a^2m^2)x^2+(2a^2mk)x +a^2k^2-a^2b^2=0.$ We want this equation to have a "double root." That happens iff the discriminant is $0$. It is a nuisance to type the discriminant in this case, but recall that the discriminant of the quadratic polynomial $px^2+qx+r$ is $q^2-4pr$.
We end up with an equation for $k$, actually a very simple equation, since the discriminant condition gives us a linear equation for $k^2$.
Remark: There is a much nicer way, which I will not give the details of. Take the ellipse. Scale distances in the $y$ direction until you get a circle. Note what happens to the desired slope $m$ under the scaling. Now find the tangent lines using circle geometry properties. Scale back.