In complex analysis, you might want to think of contour integrals as anti-derivatives. This helps to explain why the path can be moved (as long as it does not pass over a singularity) without altering the integral; it is just the difference of the anti-derivative at the endpoints.
Another way to express this is using Green's Theorem applied to a complex differentiable function:
$$
\oint_{\partial\Omega} f(z)\,\mathrm{d}z
=\iint_\Omega(if_x-f_y)\,\mathrm{d}x\,\mathrm{d}y\tag{1}
$$
The Cauchy-Riemann Equations are simply
$$
if_x=f_y\tag{2}
$$
Applying $(2)$ to $(1)$ yields Cauchy's Integral Theorem:
$$
\oint_{\partial\Omega} f(z)\,\mathrm{d}z=0\tag{3}
$$
when $f$ is holomorphic (i.e. satisfies the Cauchy-Riemann Equations) in $\Omega$.
$\hspace{2.5cm}$
Thus, the difference of the integral along the green path and the integral along the red path is the integral along the blue path. According to $(3)$, that is $0$.
There are points at which otherwise holomorphic functions go bad. These are singularities. The residue is $\frac1{2\pi i}$ times the integral counter-clockwise around such a point.
$\hspace{2.5cm}$
Note that the difference between the integrals along the green and red paths is the integral along the blue path, taking the integral in along the bottom of the blue line and out along the top (the integrals along the lines cancel, being in opposite directions). The blue contour is the boundary of the "C"-shaped area which avoids the singularity, so the integral along the blue contour is $0$. Therefore, the integral along the green path equals the integral along the red path. Thus, it does not matter which contour around the singularity we take, the residue will be the same.
Contour integrals are integrals of complex-valued functions over a contour's worth of complex numbers in the complex plane $\Bbb C$, whereas line integrals are integrals of either scalar functions or vector-valued functions over a curve in $n$-dimensional space $\Bbb R^n$.
If you want to understand contour integrals, knowing about complex numbers is a must, so make sure you are familiar with them. There is a very important and special difference between $\Bbb R$ and $\Bbb C$ that occurs very soon when learning complex analysis.
With real functions $\Bbb R\to\Bbb R$, having a derivative
$$f'(x)=\lim_{h\to0}\frac{f(x+h)-f(x)}{h} $$
means it's called differentiable. The class of continuous functions is $C^0$, and the strictly smaller subclass of differentiable functions is $C^1$. A stronger property still is being twice-differentiable, which means being in $C^2$. Indeed for every natural number $n$, the class $C^{n+1}$ is strictly contained inside $C^n$. The intersection $C^\infty$ is the class of smooth functions, those which are infinitely-differentiable. A strictly stronger property than $C^\infty$ is real-analytic, which means admits a locally convergent power series representation. These are $C^\omega$ functions.
With complex-valued functions $f:\Bbb C\to\Bbb C$, the derivative $f'(z)$ is defined by the same limit as before but with $h\to0$ occurring within $\Bbb C$ (so in particular it may approach $0$ in the complex plane from any direction). If $f'(z)$ exists we say $f$ is complex-differentiable. The special fact here is that if $f$ is once complex-differentiable, then it is infinitely differentiable, and moreover it is also complex-analytic (now "locally" means in a neighborhood of a point in the complex plane, instead of a neighborhood in the real line). Since this is so special, we have a special word for being complex-differentiable/analytic, which is holomorphic.
In real variable calculus, we have a substitution rule telling us that
$$\int_{u=u(a)}^{u=u(b)}f(u)\,{\rm d}u=\int_a^b f(u(t))u'(t)\,{\rm d}t.$$
This is true even if $u:[a,b]\to[u(a),u(b)]$ is not injective and in some parts "back-tracks." This hints at path-independence (and also hints at orientation of intervals, since even if $a<b$ we could have $u(b)<u(a)$ if $u$ reverses orientation).
Analogously, given a differentiable path $\gamma:[0,1]\to\Bbb C$, the path integral $\int_\gamma f(z)\,{\rm d}z$ is defined to be
$$\int_\gamma f(z)\,{\rm d}z=\int_0^1f(\gamma(t))\gamma'(t)\,{\rm d}t.$$
Note that $\gamma$ is complex-valued. If instead we make $\gamma$ piecewise differentiable, then we would have to break this definition up into pieces as appropriate.
One proves this quantity is independent of how one uses $\gamma$ to parametrize a curve $\gamma([0,1])$ if $f$ is holomorphic. Moreover, if $D$ is some simply-connected domain on which $f$ is holomorphic, then $\int_\gamma f(z)\,{\rm d}z$ is the same for all paths $\gamma$ between two given points that remains entirely within $D$. In particular, if $\gamma$ is a loop from a point back to itself, we use the notation $\oint_\gamma f(z)\,{\rm d}z$, and it is $0$.
If $D$ is not simply connected (if it has loops that cannot be contracted to a point within $D$, like an annular region or any simply-connected domain with points deleted from it) then this is not true, for instance $\frac{1}{z}$ is not defined at $0$ and $\oint_\gamma \frac{1}{z}\,{\rm d}z=2\pi i$ if $\gamma$ is a loop that goes once around $0$ in the counterclockwise direction. This stems from the fact that $\log z$ goes from $0$ to $2\pi i$ as we go around the unit circle from $1$ to itself counterclockwise.
To evaluate contour integrals $\oint_\gamma f(z)\,{\rm d}z$, one uses "residue calculus," which is a part of the branch of mathematics called complex analysis (some sources call it complex variables too). In order to learn more, you'll want to get a text, or take a class, or google around for scattered notes and videos on complex analysis (it's certainly possible to learn for free online).
Best Answer
It's a line integral, which you will recognize from multivariable calculus. Usually, a line integral is written
$$\int_C P(x,y) \, dx + Q(x,y) \, dy$$
for real-valued functions $P$ and $Q$ of two real variables. You can turn a complex contour integral into something resembling this using naive algebra, writing $f = u + iv$ and $z = x + iy$ (thus $dz = dx + i \, dy$) as real and imaginary parts:
$$\int_C f(z) \, dz = \int_C \bigl(u(x + iy) + i v(x + iy)\bigr) (dx + i\, dy) \\ = \int_C \bigl(u(x + iy) \, dx - v(x + iy) \, dy\bigr) + i \int_C \bigl(u(x + iy) \, dy + v(x + iy) \, dx\bigr)$$
where everything is now a function of $x$ and $y$. Not every line integral is a complex contour integral, though.