The intersection pairing between two divisors on a nonsingular algebraic surface over a field is defined thanks to the following theorem (the reference is Hartshorne's book):

One can define a pairing for any couple of invertible sheaves $\mathcal L,\mathcal M\in\operatorname{Pic}(X)$ as follows:
$$\mathcal L.\mathcal M:=\chi(\mathcal O_X)-\chi(\mathcal L^{-1})-\mathcal (M^{-1})-\chi( \mathcal L^{-1}\otimes \mathcal M^{-1})\quad\quad (\ast)$$
By using the well known isomorphism between $\operatorname{Pic}(X)$ and the group of divisors up linear equivalence, one can clearly define:
$$C.D:=\mathcal O_X(C).\mathcal O_X(D)$$
and the final step is to show that this definition satisfies properties (1)-(4) of the above theorem.
So everything is very clear, but I don't understand what is the meaning of the definition $(\ast)$. It seems to me that this pairing for invertible sheaves appears out of the blue. Can you give any intuitive motivation about its nature? Why do we need the Poincare characteristics? Why are we taking the inverse sheaves?
Here is a simple way to connect ($\star$) to your geometric intuition.
Suppose $C$ and $D$ are two curves on your surface. There exists an exact sequence, $$ 0 \to \mathcal O_{X}(-C-D) \to \mathcal O_X(-C)\oplus \mathcal O_X(-D) \to O_X \to \mathcal O_{C \cap D} \to 0,$$ where $\mathcal O_{C \cap D}$ is the skyscraper sheaf supported on the intersection points of $C$ and $D$ with stalks of dimension equal to the intersection multiplicity at each intersection point.
[To spell out the above morphisms more explicitly, suppose that ${\rm Spec \ } A \subset X$ is a open affine on which $C$ and $D$ are the vanishing loci of $f$ and $g$ in $A$ respectively. Then the associated exact sequence of modules over ${\rm Spec \ } A$ is $$ 0 \to A \overset{(-g,f)}{\to} A^{\oplus 2}\overset{(f,g)}{\to} A \to A/(f,g) \to 0.$$ Indeed, the stalk at an intersection point $x \in C \cap D$ is $A_x/(f,g)$, whose dimension is the standard definition of the intersection multiplicity of $C$ and $D$ at $x$. ]
Anyway, your intuitive notion of intersection pairing is that $C.D$ is the number of points in $C\cap D$ counted with multiplicity. But this is exactly the same thing as the number of global sections of $\mathcal O_{C \cap D}$. Since $\mathcal O_{C \cap D}$ is a skyscraper sheaf, its higher cohomologies vanish, so this is the same as the Euler characteristic $\chi(\mathcal O_{C \cap D})$. But then, by the above exact sequence, this Euler characteristic is equal to $\chi(\mathcal O_X) - \chi(\mathcal O_X(-C)) - \chi(\mathcal O_X(-D)) + \chi(\mathcal O_X(-C-D)),$ which agrees with your $(\star)$.