Suppose we have a curve $y=f(x)$. To get the equation of the line
tangent to our curve at $(a,f(a))$, we need to
Figure out the slope of the tangent line. This is
$$m = f'(a)=\lim_{x \to a} \frac{f(x)-f(a)}{x-a} = \lim_{h \to 0}
\frac{f(a+h)-f(a)}{h}.$$
Use the point-slope formula $y-y_0 = m(x-x_0)$ to get the
equation of the line:
$$ y - f(a) = m (x-a).$$
[Warning: $f'(a)$ is a number, not a function of $x$! If you compute
the derivative using a formula, you have to plug in $x=a$.]
This is explained, with examples, in the following video.