From secant to tangent
On $f(x) = x^2/2$, $P = (1, 0.5)$ is pinned and $Q$ sits $h$ to the right. As $Q$ slides into $P$, where does the slope of line $PQ$ head?
The readout falls: $1.9000$ at $h = 1.80$, $1.5000$ at $1.00$, $1.0500$ at $0.10$, $1.0100$ at $0.02$. It crowds in on $1$, matching f′(1), as the secant settles onto the dashed tangent.
You were watching the difference quotient $\frac{f(1+h) - f(1)}{h}$: rise over run from $P$ to $Q$, an average rate of change. At $h = 0$ it reads $0/0$, so take the limit instead: $\frac{(1+h)^2/2 - 1/2}{h} = 1 + \frac{h}{2} \to 1$.
That limit is the slope of the tangent line at $P$. It is called the derivative of $f$ at $a$, written $f'(a)$:
Why define the slope at $P$ as a limit, instead of setting $h = 0$ in $\frac{f(1+h) - f(1)}{h}$?
The secant slope is exactly $m = 1 + h/2$. What does the readout show at $h = 0.50$, and what is $f'(1)$?
For $g(x) = x^2$ at $a = 3$, the difference quotient is $\frac{(3+h)^2 - 9}{h} = 6 + h$. What is $g'(3)$?
No single secant is the tangent. The tangent is their limit, and its slope $f'(a)$ is an average rate shrunk to an instant.