I think it's helpful to consider $(i)$ a simpler statement than Goodstein's theorem and $(ii)$ a weaker theory than $\mathsf{PA}$. The reason for the former is that Goodstein's theorem has lots of complexity which isn't really germane to the general logical issues at play; the reason for the latter is that there is a particular technical result (Tennenbaum's theorem) which prevents us from having any too-nicely-describable nonstandard models of $\mathsf{PA}$ at all, and again that makes the logical issues look more troubling than they really are.
So let's take as our statement "Every number is either even or odd" which we can formally express as $$(\star):\quad\forall x\exists y(y+y=x\vee y+y+1=x),$$ and let's take as our theory Robinson's arithmetic $\mathsf{Q}$. This theory, in contrast with $\mathsf{PA}$, has lots of easily-describable nonstandard models. In particular, my favorite nonstandard model of $\mathsf{Q}$ is the set $\mathfrak{P}$ of polynomials in a single variable $x$ with integer coefficients and nonnegative leading coefficient, ordered by eventual domination as $x\rightarrow\infty$. (More snappily, take the ring $\mathbb{Z}[x]$, order it so that $p>q$ whenever $p$ is a polynomial of higher degree than $q$, and look at the nonnegative elements of that ordered ring.)
Now it's easy to show that $\mathfrak{P}$ does not satisfy $(\star)$: just consider the polynomial $x$ by itself. To us, this is not a natural number, but "within $\mathfrak{P}$" it looks perfectly fine. Perhaps belaboring the point, there is a unique way embedding of $\mathbb{N}$ inside $\mathfrak{P}$, and $x$ is not in the image of that embedding.
The case of $\mathsf{PA}$ and Goodstein's theorem is fundamentally no different: we can find a (necessarily nonstandard) model $\mathfrak{M}$ of $\mathsf{PA}$ such that $\mathfrak{M}$ "thinks" that Goodstein's theorem fails. But any of the things $\mathfrak{M}$ thinks are counterexamples to Goodstein will be nonstandard, just as $x$ was a nonstandard element of $\mathfrak{P}$ in the example above.
The following old answers of mine cover related material: on $\mathfrak{P}$ specifically and on nonstandard models in general (the latter is a bit technical unfortunately).