The quaternions $\mathbb{H}$ are a four-dimensional algebra spanned by basis elements $1,\mathbf{i},\mathbf{j},\mathbf{k}$, where $1$ is the multiplicative identity, $\mathbf{i},\mathbf{j},\mathbf{k}$ are three different square roots of $-1$, and $\mathbf{i},\mathbf{j},\mathbf{k}$ satisfy a "cyclic" relation (multiply any two of them in cyclic order, and you get the third, otherwise if you multiply them in the "wrong" order you get the negative of the third). This yields a multiplication table
$$ \begin{array}{l|cccc} & 1 & \mathbf{i} & \mathbf{j} & \mathbf{k} \\ \hline 1 & 1 & \mathbf{i} & \mathbf{j} & \mathbf{k} \\ \mathbf{i} & \mathbf{i} & -1 & \mathbf{k} & -\mathbf{j} \\ \mathbf{j} & \mathbf{j} & -\mathbf{k} & -1 & \mathbf{i} \\ \mathbf{k} & \mathbf{k} & \mathbf{j} & -\mathbf{i} & -1 \end{array} $$
This is just the multiplication table for $\{1,i,j,k\}$ inside $Q_8$! So it turns out, $Q_8$ is literally a group of quaternions (so, a subgroup of $\mathbb{H}^\times$), the same way $\{1,-1\}$ is a group of real numbers and the same way that $\{1,i,-1,-i\}$ is a group of complex numbers. Moreoever, $Z(Q_8)=Q_8\cap Z(\mathbb{H})$ since $Z(\mathbb{H})=\mathbb{R}$, and any transversal for $Q_8/Z(Q_8)$ (so, $\{\pm1,\pm i,\pm j,\pm k\}$ for four choices of signs) will be an orthonormal basis for $\mathbb{H}$ with respect to its natural inner product.
(Hamilton wrote down the relations $i^2=j^2=k^2=ijk=-1$ on the bridge. Exercise: Can you derive the multiplication table from these relations?)
(The reason I use boldface is that it is often helpful to think of a quaternion as a formal combination of a scalar and a vector, $q=r+\mathbf{u}$. Then the product of two purely imaginary quaternions is seen to be $\mathbf{uv}=-\mathbf{u}\cdot\mathbf{v}+\mathbf{u}\times\mathbf{v}$ - notice how the imaginary elements in the above multiplication table match that for the cross product! - and then we can multiply two arbitrary quaternions $(r_1+\mathbf{u}_1)(r_2+\mathbf{u}_2)$ with the distributive property.)