Definition. A point $z_0$ is called a singular point or a singularity of a function $f$ if $f$ fails to be analytic at $z_0$ but is analytic at some point in every neighbourhood of $z_0$. A singularity is said to be isolated if in addition there is a deleted neighbourhood $0<|z-z_0|<\epsilon$ of $z_0$ throughout which $f$ is analytic.
Example. $f(z)=\frac{z+1}{z^3(z^2+1)}$ has three isolated singularities $z=0$ and $z=\pm i$.
Example. $\mathrm{Log}z=\ln r+i\Theta$ ($r>0$, $-\pi<\Theta<\pi$), the principal branch of the logarithmic function $\log z$ has a singularity at the origin but it is not isolated.
Example. $f(z)=\frac{1}{\sin\left(\frac{\pi}{z}\right)}$ has singularities $z=0$ and $z=\frac{1}{n}$ ($n=\pm 1, \pm 2, \cdots$). Each singularity except $z=0$ is isolated.
If $z_0$ is an isolated singularity of a function $f$, then there exists $R>0$ such that $f$ is analytic throughout which $0<|z-z_0|<R$, so $f(z)$ is represented by a Laurent series
\begin{align*}
f(z)&=\sum_{n=0}^\infty a_n(z-z_0)^n+\frac{b_1}{z-z_0}+\frac{b_2}{(z-z_0)^2}+\cdots+\frac{b_n}{(z-z_0)^n}+\cdots\\
&(0<|z-z_0|<R)\\
b_n&=\frac{1}{2\pi i}\oint_C\frac{f(z)}{(z-z_0)^{-n+1}}dz\ (n=1,2,\cdots)
\end{align*}
where $C$ is any positively oriented simple closed contour around $z_0$ and lying in the punctured disk $0<|z-z_0|<R$. The coefficient $b_1$ of $\frac{1}{z-z_0}$ in the above Laurent series expansion is called the residue of $f$ at the isolated singularity $z_0$. The residue is important since from the integral formula for $b_n$ above, we find
$$\oint_C f(z)dz=2\pi i b_1.$$
That is, the contour integral $\oint_C f(z)dz$ can be evaluated using the residue $b_1$. The residue $b_1$ of $f(z)$ at $z=z_0$ is also denoted by $\mathrm{Res}_{z=z_0}f(z)$.
Example. Consider $\oint_C\frac{dz}{z(z-2)^4}$ where $C$ is the positively oriented circle $|z-2|=1$. The integrand $\frac{1}{z(z-2)^4}$ is analytic everywhere except at the isolated singularities $z=0$ and $z=2$, so it has a Laurent series representation in the punctured disk $0<|z-2|<2$.
\begin{align*}
\frac{1}{z(z-2)^4}&=\frac{1}{(z-2)^4}\cdot\frac{1}{2+(z-2)}\\
&=\frac{1}{2(z-2)^4}\cdot\frac{1}{1-\left(-\frac{z-2}{2}\right)}\\
&=\frac{1}{2(z-2)^4}\sum_{n=0}^\infty\frac{(-1)^n}{2^n}(z-2)^n\\
&=\sum_{n=0}^\infty\frac{(-1)^n}{2^{n+1}}(z-2)^{n-4}\ (0<|z-2|<2)
\end{align*}
The residue of $\frac{1}{z(z-2)^4}$ at $z=2$ is $-\frac{1}{16}$, hence
$$\oint_C\frac{dz}{z(z-2)^4}=2\pi i\left(-\frac{1}{16}\right)=-\frac{\pi i}{8}.$$
Example. Evaluate $\oint_C e^{\frac{1}{z^2}}dz$ where $C$ is the unit circle $|z|=1$.
Solution. $e^{\frac{1}{z^2}}$ is analytic everywhere except at $z=0$. $e^{\frac{1}{z^2}}$ has an Laurent series expansion
$$e^{\frac{1}{z^2}}=1+\frac{1}{1!z^2}+\frac{1}{2!z^4}+\cdots\ (0<|z|<\infty).$$
Since $b_1=0$, $\oint_C e^{\frac{1}{z^2}}dz=0$.