This is pretty terse stuff from Hartshorne! Just to be clear, he is talking about the case when $C$ and $D$ intersect transversally.
To show that the second sequence above is exact on the left, we have to show that the sheaf $\operatorname{Tor}_1(\mathcal O_D, \mathcal O_C)$ vanishes.
It's enough to check this on stalks.
First let $p$ be a point of $C \cap D$, and let $R=\mathcal O_{X,\, p}$. Then the stalks of $\mathcal O_D$ and $\mathcal O_C$ at $p$ have the form $R/(f)$ and $R/(g)$, for some irreducible elements $f, \, g$ of $R$.
Now for any $R$-module $B$, we have (according to Wikipedia)
$$\operatorname{Tor}_1^R(R/(f),B) = \{ b \in B : fb = 0 \} ;$$
applying this with $B=R/(g)$, and using the fact that $f$ and $g$ generate the maximal ideal of $R$ (by definition of transversal intersection), we get the vanishing we want.
Finally, if $p$ is a point that doesn't lie on both $C$ and $D$, then the stalk of either $\mathcal O_C$ or $\mathcal O_D$ will be zero at $p$, so again the stalk of the Tor sheaf will vanish there.