Definition of Cartier divisors

This actually has nothing to do with divisors: it is a purely abstract fact about sheaves.

If $A$ and $B$ are abelian sheaves such that $A \subseteq B$, then we can define the quotient presheaf $P$ by setting $P(U) := B(U) / A(U)$. The quotient sheaf $C := B / A$ is the sheaf associated to $P$: this is where the idea of an element defined locally on the sets of an open covering comes from.

In fact, one can show that the stalks satisfy $C_x \cong B_x / A_x$ for every point $x$, and that for any open set $U$ containing $x$ and any section $s \in C(U)$, there is an open set $V$ containing $x$ on which $s|_V$ is in the image of an element in $B(V)$.

Once we're down to the level of abelian groups, we invoke the fact that in general, for abelian groups $H \subseteq G$, one can name elements of $G/H$ by giving an element of $g$ in the right equivalence class. Then the assertion that the elements named by $g$ and by $g'$ are equal in $G/H$ becomes that $g-g' \in H$.