I was just trying to make sense of what $\operatorname{Spec}(\mathbb{Z})$ really meant. We all know that the prime ideals of $\mathbb Z$ are of the form $p\mathbb Z$ for primes p, and of course the zero ideal. This question consists of two parts so if you are uninterested in checking my work my real question is at the bottom.
The Zariski topology on $\operatorname{Spec}(\mathbb Z)$ is precisely the finite complement topology since for any finite set of prime ideals $\{p_i \mathbb Z,1\le i\le n\}$= $V(p_1...p_n \mathbb Z)$ using notation from Hartshorne where $V(a)$ is the set of prime ideals containing $a$.
Now then, what is the structure sheaf, $\mathscr{O}$, of this space?
Any open set $U$ is of the form $\operatorname{Spec}(\mathbb Z) -\{p_i \mathbb Z\}$.
We know that for all $s \in \mathscr{O}(\operatorname{Spec}(\mathbb Z) - \{p_i\mathbb Z\})$ and points $x\in U$ there is an open $V$ = $\operatorname{Spec}(\mathbb Z) -\{p_i\mathbb Z, q_i\mathbb Z\}$ subset of $U$ containing $x$ such that $s(x)=\frac{a}{f}$ where $f$ is not in any of the ideals in $V$. Thus f only consists of prime factors $p_i$ or $q_i$.
Now, $s(x) = a/f$ but we also know that if $W = \operatorname{Spec}(\mathbb Z)- \{p_i\mathbb Z, r_i\mathbb Z\}$ is another open subset of U containing an arbitrary point $x'$ that $W$ and $V$ must intersect nontrivially. Thus since s(x) is constant on $V$ and constant on $W$ $s(x) = s(x')$.
This proves injectivity and "well-definedness"of the function
$$\mathscr{O}(\operatorname{Spec}(\mathbb Z) -\{p_i \mathbb Z\})\rightarrow \{\frac{a}{f}: a\in \mathbb Z, f\in p_1...p_n\mathbb Z\}$$
Given by $s \mapsto s(u) $, for some $u\in U$.
Surjectivity is easy to check.
Thus this is a ring isomorphism and the restriction maps of $\mathscr O$ become inclusions $\{\frac{a}{f}: a\in \mathbb Z, f\in p_1...p_n\mathbb Z\} \rightarrow \{\frac{a}{f}: a\in \mathbb Z, f\in q_1...q_n p_1...p_n\mathbb Z\}$.
(Please do check all of my work, I am new to this subject)
Finally, where does this bring us?
There is an exercise in Hartshorne asking us to prove that $\operatorname{Spec}(\mathbb Z)$ is a terminal object in the category of schemes. If it really is a terminal object, then letting $f: X \rightarrow \operatorname{Spec}(\mathbb Z)$ take every point of $X$ to the zero ideal is obviously continuous and letting the associated morphism of sheaves be the zero morphism this obviously gives us a morphism of schemes. But why do we have to choose the zero ideal? Can't we let $f$ map all of the points of $X$ to any ideal and letting the morphism of sheaves be the zero morphism thereby giving us two maps $X \rightarrow \operatorname{Spec}(\mathbb Z)$ which are not equal?
Observe affine schemes first. Let $R$ be a ring equipped with the Zariski topology, and assume $f:R\rightarrow spec(\mathbb Z)$ is a scheme morphism. Is there a canonical construction of a map $g:\mathbb Z \rightarrow R$ that is evident?