Let $C$ be a nonsingular curve and $\mathcal{F}$ be a locally free sheaf with rank $2$. suppose that $H^0(\mathcal{F})\neq 0$ and let $s \in H^0(\mathcal{F})$ be a nonzero section. Then $s$ determines an injective map $\mathcal{O}_C \rightarrow \mathcal{F}$ ( I think that since $\mathcal{F}_U=\mathcal{O}_U \oplus \mathcal{O}_U$ for any open subset $U$, it determines injection). Put $\mathcal{L}=\mathcal{F}/\mathcal{O}_C$. I easily think that since $\mathcal{L}_p \cong (\mathcal{F}/\mathcal{O}_C)_p \cong \mathcal{F}_p/\mathcal{O}_{C,p} \cong \mathcal{O}_{C,p} \oplus \mathcal{O}_{C,p}/\mathcal{O}_{C,p} \cong \mathcal{O}_{C,p}$ for any point $p\in C$, $\mathcal{L}$ is invertible. But In Hartshorne book(p.372), to show $\mathcal{L}$ is invertible, it must be check that $\mathcal{L}$ is torsion free since $C$ is nonsingular and $\mathcal{L}$ has rank $1$ in any case.
My first question is why we check that $\mathcal{L}$ is torsion free??
So, suppose $\mathcal{L}$ is not torsion free and let $\mathcal{G}\subset \mathcal{F}$ be the inverse image of the torsion subsheaf of $\mathcal{L}$ by the map $\mathcal{F} \rightarrow \mathcal{L}$. Then,
My last question is why $\mathcal{G}$ is torsion free of rank $1$ on $C$??
Algebraically, you're asking if given a short exact sequence of $R$-modules
$$0 \to R \to M \to N \to 0$$
where $M$ is locally free of rank $2$, that $N$ is necessarily locally free of rank $1$. This need not be true: consider
$$0 \to \mathbb{Z} \xrightarrow{\varphi} \mathbb{Z} \oplus \mathbb{Z} \to N \to 0$$
where $\varphi(n) = (n, 2n)$. Then $N \cong \mathbb{Z} \oplus \mathbb{Z}/2\mathbb{Z}$ is not locally free - one sees that the torsion is precisely the obstruction. $\newcommand{\rank}{\operatorname{rank}}$
For your last question: a quick rank calculation shows that $\rank \mathcal{G} = 1$ (since by assumption $\rank \mathcal{L} = 1$ and $\mathcal{L}$ has nonzero torsion, so $0 < \rank \mathcal{G} < 2 = \rank \mathcal{F}$). $\mathcal{G}$ is torsionfree because $\mathcal{F}$ is torsionfree, and submodules of torsionfrees are torsionfree.