Let $G$ be an extension of$\mathbb{Q}$ such that $[G:\mathbb{Q}] =2$. Prove that $G = \mathbb{Q}(\sqrt{d})$ for some $d\in \mathbb{Z}$.
For one, I am having trouble picturing what $\mathbb{Q}(\sqrt{d})$ is so I'd like if someone could please explain that.
Now I have this theorem that says if G is an extension of $\mathbb{Q}$ and $[G:\mathbb{Q}]$ is prime then $G = \mathbb{Q}(u)$ for any $u\in G$ \ $\mathbb{Q}$, but again I don't understand what $\mathbb{Q}(u)$ looks like so I'm not quite sure how to apply it.
What $\mathbb{Q}(\sqrt{d})$ looks like: $$\mathbb{Q}(\sqrt{d})=\{p+q\sqrt{d}\mid p,q\in\mathbb{Q}\}$$ So you are just adding all rational multiples of $\sqrt{d}$.
$[G:\mathbb{Q}]=2$ means the $\mathbb{Q}$-basis of $G$ consists of only two elements, that is $$G=\left <1,\alpha\right >_{\mathbb{Q}}$$ for some $\alpha\in G$ that is not in $\mathbb{Q}$. This means that every element in $G$ can be written as $p\cdot 1+q\cdot \alpha$. Knowing this, what can we say about $\alpha^2$?
Just to expand this answer (from the comments). Since $\alpha^2\in G$ we should be able to express $\alpha^2$ in terms of $1$ and $\alpha$ (@Robert Lewis' comment). If this were not the case, we would have to add $\alpha^2$ to our basis to get $G=\left <1,\alpha,\alpha^2\right>$, but this is impossible since $[G:\mathbb{Q}]=2$.
We therefore know that $\alpha^2=a\alpha+b$. We can find $\alpha$ using the quadratic formula, so $$\alpha=p\pm q\sqrt{d}$$
where $p,q\in\mathbb{Q}$ and $d$ is a squarefree integer. We can therefore write our basis as $$\left <1,\sqrt{d}\right >_\mathbb{Q}=\mathbb{Q}(\sqrt{d})$$