Suppose that $f(z)$ is analytic everywhere inside and on a simple closed contour $C$, taken in the positive sense. If $z_0$ is a point exterior to $C$, then by Cauchy’s Integral Theorem,
$$\oint_C\frac{f(z)}{z-z_0}dz=0.$$
Now, the question is what would be the value of the integral
$$\oint_C\frac{f(z)}{z-z_0}dz$$
if $z_0$ is a point interior to $C$? To answer this question, let us consider a tiny circle centerd at $z_0$ and with radius $r$, also oriented counterclockwise as shown in the figure.
Then using Cauchy’s Integral Theorem, we obatin
$$\oint_C\frac{f(z)}{z-z_0}dz-\oint_{C_1}\frac{f(z)}{z-z_0}dz=0.$$
Let $z=z_0+re^{i\theta}$. Then
\begin{align*}
\oint_{C_1}\frac{f(z)}{z-z_0}dz&=\int_0^{2\pi}\frac{f(z_0+re^{i\theta})}{re^{i\theta}}rie^{i\theta}d\theta\\
&=i\int_0^{2\pi}f(z_0+re^{i\theta})d\theta\\
&\to 2\pi if(z_0)
\end{align*}
as $r\to 0$. Therefore, we obtain
$$f(z_0)=\frac{1}{2\pi}\oint_C\frac{f(z)}{z-z_0}dz.$$
This formula is called Cauchy Integral Formula.
Example. Let $C$ be the positively oriented circle $|z|=2$. The function $f(z)=\frac{z}{9-z^2}$ is analytic within and on $C$. Since $z_0=-i$ is interior to $C$, by Cauchy Integral Formula,
\begin{align*}
\oint_C\frac{z}{(9-z^2)(z+i)}dz&=\oint_C\frac{\frac{z}{9-z^2}}{z+i}dz\\
&=2\pi\frac{-i}{9-(-i)^2}\\
&=\frac{\pi}{5}.
\end{align*}
Derivatives
Suppose that $|\Delta z_0|$ is small enough so that $z_0+\Delta z_0$ is still interior to the contour $C$. Then by Cauchy Integral Formula, we obtain
$$\frac{f(z_0+\Delta z_0)-f(z_0)}{\Delta z_0}=\frac{1}{2\pi i\Delta z_0}\left\{\oint_C\frac{f(z)}{z-z_0-\Delta z_0}dz-\oint_C\frac{f(z)}{z-z_0}dz\right\}.$$
So,
\begin{align*}
f'(z_0)&=\lim_{\Delta z_0\to 0}\frac{f(z_0+\Delta z_0)-f(z_0)}{\Delta z_0}\\
&=\lim_{\Delta z_0\to 0}\frac{1}{2\pi i\Delta z_0}\left\{\oint_C\frac{f(z)}{z-z_0-\Delta z_0}dz-\oint_C\frac{f(z)}{z-z_0}dz\right\}\\
&=\lim_{\Delta z_0\to 0}\frac{1}{2\pi i\Delta z_0}\oint_C\frac{\Delta z_0f(z)}{(z-z_0-\Delta z_0)(z-z_0)}dz\\
&=\frac{1}{2\pi i}\oint_C\frac{f(z)}{(z-z_0)^2}dz.
\end{align*}
The same process can be repeated for $f'(z_0)$ and we obtain
$$f^{\prime\prime}(z_0)=\frac{2}{2\pi i}\oint_C\frac{f(z)}{(z-z_0)^3}dz.$$
Continuing, we get
$$f^{(n)}(z_0)=\frac{n!}{2\pi i}\oint_C\frac{f(z)}{(z-z_0)^{n+1}}$$
for $n=0,1,2,\cdots$ where $f^{(0)}(z)=f(z)$. This formula may also be called Cauchy Integral Formula which includes the Cauchy Integral Formula we derived earlier.
Example. If $C$ is the positively oriented unit circle $|z|=1$ and $f(z)=\exp(2z)$, then
\begin{align*}
\oint_C\frac{\exp(2z)}{z^4}dz&=\oint_C\frac{f(z)}{(z-0)^{3+1}}\\
&=\frac{2\pi i}{3!}f^{\prime\prime\prime}(0)\\
&=\frac{8\pi i}{3}
\end{align*}
where $f(z)=\exp(2z)$.
Example. Let $z_0$ be any point interior to a positively oriented simple closed contour $C$. When $f(z)=1$, Cauchy Integral Formula tells that
$$\oint_C\frac{dz}{z-z_0}=2\pi i\ \mbox{and}\ \oint_C\frac{dz}{(z-z_0)^{n+1}}=0,\ n=1,2,\cdots.$$