understand quaternion algebra ramified at p,q and split everywhere else I came across the following on this question on mathoverflow and my questions is can someone explain in more detail (e.g give a presentation by generators and relations) what $D$ and $\mathcal O_D$ are:
"Fix two primes $p$ and $q$, and let $\mathcal O_D$ be a maximal order in the quaternion algebra $D$ over $\mathbb Q$ ramified at $p$ and $q$, and split everywhere else (including at infinity).
Let $\mathcal O_D^1$ denote the multiplicative group of norm one elements in $\mathcal O_D$.Since $D \otimes_{\mathbb Q} \mathbb R \cong M_2(\mathbb R)$..."
My guess is the construction of $D$ begins with the ring $R$ of quaternions over $\mathbb Q$ $$ $:=\mathbb Q[i,j,k]/(i^2=j^2=k^2=ijk=-1)$$
and then I don't know what to do the make this ramified at $p,q$ (I know that means when we mod out by say $p$, we get a field or something) and unramified elsewhere. And then what is $\mathcal O_D$?
 A: I'm afraid the term "quaternion algebra" is a bit more general than what you're thinking of.  This is a draft of a forthcoming book on quaternion algebras by John Voight.  All of your questions are answered in this book, but I'll give a brief overview to get you started.
Given a field $F$ of characteristic $\neq 2$ and $a,b \in F^\times$, the quaternion algebra $\left(\frac{a,b}{F}\right)$ is the $F$-algebra with basis $1, i, j, ij$ subject to the relations
$$
i^2 = a, \qquad j^2 = b, \qquad ij = -ji \, .
$$
Thus the usual Hamiltonian quaternion algebra is just $\left(\frac{-1,-1}{\mathbb{R}}\right)$.
Let $B$ be a quaternion algebra over $\mathbb{Q}$.  It turns out that if we pass to the completion $\mathbb{Q}_p$ for $p$ a prime (including $\infty$), there are only two possibilities for the structure of $B_p := B \otimes_\mathbb{Q} \mathbb{Q}_p$: either $B_p$ is a division algebra, in which case we say $B$ is ramified at $p$, or $B_p$ is isomorphic to $M_2(\mathbb{Q}_p)$ (the ring of $2 \times 2$ matrices over $\mathbb{Q}_p$), in which case we say $B$ is split at $p$.  (Cf. this Wikipedia article or p. 148 of the linked book.)
In the quoted answer in the OP, the poster assumed $D$ was split at $\infty$, which means by definition that $D \otimes_\mathbb{Q} \mathbb{R} \cong M_2(\mathbb{R})$.  (The "prime at $\infty$" is the usual archimedean absolute value on $\mathbb{Q}$, so $\mathbb{Q}_\infty = \mathbb{R}$.)  For more on maximal orders and the (reduced) norm, I refer you to the linked book.
