is the group of rational numbers the fundamental group of some space?
See the Wikipedia page on Eilenberg-Mac Lane spaces for an even better statement: For every group $G$ there is a $CW$-complex $K(G,1)$ (unique up to homotopy equivalence) such that $\pi_1(K(G,1)) \cong G$ and $\pi_{n}(K(G,1)) = 0$ for all $n \neq 1$. This is also true for every other value of $1$ (to quote Mariano Suárez-Alvarez) and abelian $G$ and proofs of these statements can be found in almost all books on algebraic topology.
A nice and and rather explicit example for a space with fundamental group $\mathbb{Q}$ can be constructed using the theory of graphs of groups, see exercise 6 on page 96 of Hatcher's book.
In 1988, Shelah proved that there is no "nice" compact space with fundamental group $\mathbb{Q}$, where nice means metric, compact (hence separable) path connected and locally path connected. Indeed, Shelah has shown the fundamental group of a nice compact space is either finitely generated or has the cardinality of the continuum.
Every group is the fundamental group of a space; a relatively easy choice of such a space is the presentation complex associated to a presentation. First, every group $G$ has a presentation with some generators $g_i$ indexed by some set $I$ and some relations $r_j$ indexed by some set $J$. Let $X$ be the wedge of $|I|$ circles; by Seifert-van Kampen we know that $\pi_1(X) \cong F_{|I|}$.
Now we will add some $2$-cells corresponding to the relations. First, note that every relation $r_j$ determines a homotopy class of paths in $X$, hence a subspace isomorphic to $S^1$ of $X$. Associated to such a subspace is an attaching map $b_j : S^1 \to B^2$, and we can form the adjunction space $X \cup_{b_j} B^2$ in order to attach the appropriate $2$-cell and kill the relation $r_j$ (proven by a second application of Seifert-van Kampen). Doing this for all relations gives the appropriate space.
Yes, see Hatcher, Corollary 1.28, page 52.