How do you find the equation of a tangent line to a curve?
There is no short answer since this is a general question.
You must have a differentiable function to find a tangent line to a curve.
Note that this is also the formula for linear approximation functions.
There are many examples of tangent line and linear approximation problems, so just search for them.