By definition, $\mathbb{Q}(\sqrt 2)$ is the field generated by $\mathbb{Q}$ and $\sqrt 2$, while $\mathbb{Q}[\sqrt 2]$ is the ring generated by these (compare with the polynomial ring $\mathbb{Q}[x]$). However, since $\sqrt 2$ is algebraic over $\mathbb{Q}$, these coincide: In fact, we can compute that
$$\sqrt 2 \left(\frac{\sqrt 2}{2}\right) = 1$$
so that $\sqrt 2$ has a multiplicative inverse in $\mathbb{Q}[\sqrt 2]$.
For a different scenario, note that $\mathbb{Q}[\pi]$ is properly contained in $\mathbb{Q}(\pi)$, since $\pi$ has no multiplicative inverse within the ring $\mathbb{Q}[\pi]$.