This question already has an answer here:

Let $S$ be a compact submanifold of $X$ smooth manifold. I know that $T_X|_S=T_S\oplus N_{S/X}$ where $N_{S/X}$ is the normal bundle. I have read that the euler class $e(N_{S/X})$ corresponds (via integration over S, i suppose) to the self intersection number $S\cdot S$. I've thought about it, but i don't know how to prove it, also i can't find the proof in any book. Do you know something about it?