There has already been a question on this exact Proposition in Hartshorne (Proof of Halphen's Theorem), but there was not a satisfactory answer, and I'll try to make more precise the source of my confusion.
The harder half of the Proposition is to show that, if $X$ is a genus $g\geq 2$ curve of degree $d$, then there exists a nonspecial ample divisor $D$ of degree $d$ if $d\geq g+3$. Here, nonspecial means $h^{0}(\mathscr{O}(K-D))=0$, where $K$ is the canonical divisor, and but remembering this definition and the exact bounds on $d$ and $g$ aren't necessary to understand my question.
Hartshorne attempts to prove this using a dimension counting argument, where he lets the points of $X^d$ parametrize the space of effective divisors of degree $d$ and he shows that the set of divisors $D$ that we don't want has dimension strictly less than $d$. To be clear, a point $(P_1,\ldots,P_d)$ in $X^d$ represents the divisor $P_1+\cdots+P_d$, so the correspondence of the points of $X^d$ and divisors of degree $d$ is only up to permutation.
There are two important steps that are confusing to me:
1) Hartshorne claims that, since ${\rm dim}|K|:=h^{0}(\mathscr{O}(K))-1=g-1$, the space of degree $d-2$ divisors in $X^{d-2}$ that are linearly equivalent to a subsystem of $K$ is at most $g-1$ in dimension.
2) Since the set $S\subset X^{d-2}$ of effective divisors that are linearly equivalent to a subsystem $K$ has dimension at most $g-1$, the set $T$ in $X^d$ consisting of divisors of the form $E+P+Q$, where $P$ and $Q$ are points and $E$ is linearly equivalent to $K$ has dimension at most $g+1$.
The claims about dimension are plausible, but it's not so clear to me how, for example, the effective divisors linearly equivalent to a subsystem $K$ sit inside $X^d$ (it could be some nasty set). Why, for example, does the dimension ${\rm dim}|K|$ correspond to the dimension of these effective divisors in $X^d$?
It's not linearly equivalent to $K$; it's linearly equivalent to a subsystem of $K$, which can be quantified as saying that $K-D$ has a global section, in other words $H^0(K-D) > 0$. $K$ gives a divisor on $X^d$, and the property that $H^0(K-D) > 0$ is a closed property by semicontinuity. That the divisors of degree $d$ with this property have dimension $\le g-1$ is simply because the set of all full canonical divisors have dimension less than this.