What is the definition of scheme over a field? For a fixed scheme $S$, a scheme over $S$ is defined to be a scheme $X$ together with a morphism $X \to S.$ I am following Hartshorne, and I cannot find a definition of scheme over a field $k$. Is it a scheme $X$ together with a morphism $X \to \operatorname{Spec}(k)$?

Yes, this is it. If your scheme $X$ is affine, this is the same thing as an algebra over the field $k$, hence the terminology.
