It's often said that there are only two nonabelian groups of order 8 up to isomorphism, one is the quaternion group, the other given by the relations $a^4=1$, $b^2=1$ and $bab^{-1}=a^3$. 

I've never understood why these are the only two. Is there a reference or proof walkthrough on how to show any nonabelian group of order 8 is isomorphic to one of these? 

A very down-to-Earth approach might be:

Let $G$ be a group of order 8.

Exercise 1: Show that the maximal order $m$ of an element $x$ of $G$ is either 2, 4, or 8.

Exercise 2: Show that if $m=2$, then the group $G$ is abelian.

Exercise 3: Show that if $m=8$, then the group $G$ is abelian.

Ok, so that leaves us with the case $m=4$. Let $x$ be an element of order 4. Let $H\simeq C_4$ be the subgroup generated by $x$.

Exercise 4: Show that $H$ is a normal subgroup of $G$.

Let $y\in G, y\notin H$ be a fixed element.

Exercise 5: Show that $y^2\in H$.

Exercise 6: Show that $yxy^{-1}$ is an element of order 4 in $H$.

Exercise 7: Show that either $yxy^{-1}=x$ or $yxy^{-1}=x^3$.

Exercise 8: Show that if $yxy^{-1}=x$, then $G$ is abelian.

Ok, so we must have $yxy^{-1}=x^3.$ Assume that this is the case in what follows.

Exercise 9: Show that if $y$ is of order 2, then $G$ is isomorphic to a dihedral group.

Exercise 10: Show that if $y$ is of order 4, then $y^2=x^2$.

Exercise 11: Show that if $y$ is of order 4, then $G$ is isomorphic to the quaternion group (or more precisely: the group of units of the Lipschitz' order)

Rejoice!

Remark: You won't need the result of Exercise 5 until the two last ones. I just added it there, because the element $y$ was introduced at that point.
