TITLE: Elementary short exact sequence of sheaves
QUESTION [19 upvotes]: This question arised when I was trying to use this answer to understand Reid's "Young Person's guide to Canonical Singularities". In particular page 352 when computing the blow-up $Y\rightarrow A^2/\mu_3$, the affine plane quotient the cyclic group of order 3, arises to the conclusion that the exceptional divisor is $E\sim P^1$, (no problems there) and $\mathcal{O}_E(-E)\sim \mathcal{O}(3)$ (problems here).
Given a variety $Y$ and an effective Cartier divisor $D$ on it, there seems to be a pretty standard exact sequence:
$$0 \longrightarrow \mathcal{O}_Y \longrightarrow \mathcal{O}_Y(D) \longrightarrow\mathcal{O}_D(D)\longrightarrow 0 $$
As far as I understand, if $U$ is an open set in $S$ and $D\cap U = div(g)_U$ (for $D$ a hypersurface, if you want, and extend by linearity), then
$$ \mathcal{O}_Y(D)(U)= \{g \in  \mathcal{O}_Y(U) \vert div(g)\geq D \}$$
or equivalently $g/f$ is regular. The first map must be something like $g\rightarrow gf$ maybe with some order. A good answer to my question would include:

Is this correct?
What is $\mathcal{O}_D(D)$?
What is the second map?
What does $\mathcal{O}_D(-D)$ mean
Why $\mathcal{O}_E(-E) \sim \mathcal{O}(3)$? I understood the RHS is generated by polynomials of degree 3?

I am aware this is a simple question and probably everyone knows why, but I could not find a proper answer for it.

REPLY [7 votes]: Diverietti's answer is exhaustive with respect to the first four questions, so let me say something just about the last one.
Miles Reid's example is actually a particular case of the following 
more general situation, which is explained for instance in Barth-Peters-Van de Ven book on compact complex surfaces.
Let $n$ and $q$ be natural numbers with $0 < q < n$, $(n,q)=1$
 and let $\xi_n$  be a primitive $n-$th root of unity.
Let us consider the action of the cyclic group 
$\mu_n=\langle \xi_n \rangle$ on
$\mathbb{C}^2$  defined by 
$\xi_n \cdot (x,y)=(\xi_nx, \xi_n^qy)$. 
Then the analytic
space $X_{n,q}=\mathbb{C}^2 / \mu_n$ has a cyclic quotient singularity of type
$\frac{1}{n}(1,q)$, and $X_{n,q} \cong X_{n', q'}$ if and only if $n=n'$ and either
$q=q'$ or $qq' \equiv 1$ (mod $n$). The exceptional divisor on the minimal
resolution $\tilde{X}_{n,q}$ of $X_{n,q}$ is a H-J string
 (abbreviation of Hirzebruch-Jung string), that is to say, a
 connected union $E=\bigcup_{i=1}^k Z_i$ of smooth rational curves $Z_1, \ldots, Z_k$ with
 self-intersection $\leq -2$, and ordered linearly so that $Z_i
 Z_{i+1}=1$ for all $i$, and $Z_iZ_j=0$ if $|i-j| \geq 2$.
More precisely, given the continued fraction
$\frac{n}{q}=[b_1,\ldots,b_k]:=b_1-
                  \cfrac{1}{b_2 -\cfrac{1}{\dotsb
                                 - \cfrac{1}{\,b_k}}}$,
we have 
$(Z_i)^2=-b_i, \quad i=1, \ldots, k.$
In the case considered by Miles Reid, we have $n=3$, $q=1$, i.e. the action is
$\xi_3 \cdot (x,y)=(\xi_3x, \xi_3y)$,
hence the resolution is a unique smooth curve $E:=Z_1$ with self-intersection $(-3)$; this explain why $\mathcal{O}_E(-E)=\mathcal{O}(3)$.
Notice that there is another possible action of $\mu_3$ on $\mathbb{C}^2$, namely
$\xi_3 \cdot (x,y)=(\xi_3x, \xi_3^2y)$.
The corresponding continued fraction is
$\frac{3}{2}=[2,2]=2-
                  \frac{1}{2}$,
so the resolution is this case is given by two smooth rational curves of self-intersection $(-2)$ intersecting in a single point (this is a Rational Double Point of type $A_2$).