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).
\int
to write $\int$ and\oint
to write $\oint$ in $\LaTeX$. $\endgroup$