The way I learned differential equations is in the form
$$y' = y$$
for example. So for example, $y' = x$ or $y'' = 0$ was never given as examples as differential equations. However, according to my new textbook $y' = x^2$ is given as an example of a differential equation.
Can someone explain what's going on here?
Yes. A differential equation is an expression involving a function (typically denoted $y(x)$) of a variable $x$, together with one or more of the derivatives of $y$. The coefficient of $y$ (or any derivative of $y$) can be zero in such an equation, so $$ y' = 0\\ y' = 3x y \\ y'' + y = 0 \\ y'' + x^2 = 9 $$ are all differential equations. Typically one requires that the coefficient of at least one of the derivatives of $y$ is nonzero, so you could say "It's an equation that specifies a function $y$ by saying something about some derivative of $y$."
Equations that don't involve anything except $y'$ are generally easy to solve: you isolate $y'$, getting something like $$ y' = x^2 $$ and then integrate both sides with respec to $x$, getting $$ y(x) + C = \frac{x^3}{3} + K $$ and then combine the two constants of integration into one to get $$ y(x) = \frac{x^3}{3} + A. $$
Of course, you can still have things like $$ (y')^5 + y' + 1 = 0, $$ where the "isolating $y'$" step may be effectively impossible. The "isolate $y'$ " strategy works best when $y'$ appears only to the first power. For other situations...you need other ideas, which is why we have whole books about ODEs. :)