Can every group be represented by a group of matrices?
Every finite group is isomorphic to a matrix group. This is a consequence of Cayley's theorem: every group is isomorphic to a subgroup of its symmetry group. Since the symmetric group $S_n$ has a natural faithful permutation representation as the group of $n\times n$ 0-1 matrices with exactly one 1 in each row and column, it follows that every finite group is a matrix group.
However, there are infinite groups which are not matrix groups, for example, the symmetric group on an infinite set or the metaplectic group.
Note that every group can be represented non-faithfully by a group of matrices: just take the trivial representation. My answer above is for the question of whether every group has a faithful matrix representation.
It is not true that every group can be represented by a group of finite-dimensional matrices (say over $\mathbb{C}$). The groups that can are called linear. There are many examples of non-linear groups; here is a relatively simple one.
Claim: The group $(\mathbb{Z}/2\mathbb{Z})^{\infty}$ is not linear.
Proof. Suppose to the contrary that there exists a faithful representation $(\mathbb{Z}/2\mathbb{Z})^{\infty} \to \text{GL}_n(\mathbb{C})$ for some $n$. In particular, for arbitrarily large $m$, there exists a faithful representation $(\mathbb{Z}/2\mathbb{Z})^m \to \text{GL}_n(\mathbb{C})$. We can conjugate this to a representation into $U(n)$ and then simultaneously diagonalize to obtain a representation into $\mathbb{T}^n$. But the subgroup of elements of $\mathbb{T}^n$ of order $2$ is $(\mathbb{Z}/2\mathbb{Z})^n$, so the representation cannot be faithful if $m > n$; contradiction.
For finite groups, the answer is yes: every finite group is isomorphic to a subgroup of $Gl(n)$ for some $n$ large enough. In fact, we can do slightly better and embed it into $SO(n)$ for $n$ large enough.
The idea: Every group acts on itself, by, say, left translations. This gives an embedding $G\rightarrow S_{|G|}$ into the symmetric group on $|G|$ letters. Hence, every group is a subgroup of some $S_k$ for $k$ large enough.
Thus, we just need to show that we can embed every $S_n$ into $GL_n$ for $n$ large enough. But $S_n$ acts on $\mathbb{R}^{n}$ by permuting the coordinates. It's easy to see that this action is linear, hence defines an embedding $S_n\rightarrow GL(n)$.
If you insist on positive determinant, one can include $GL(n)$ into $Gl(n+1)$ sending a matrix $A$ to $\operatorname{diag}(A, \operatorname{sign}(\det(A)))$.
Finally, to embed orthogonally, pick your favorite inner product $\langle, \rangle$ on $\mathbb{R}^n$ and define $\langle x, y\rangle_1 = \sum_{g\in G} \langle g(x),g(y)\rangle$. It's easy to see that this new metric is $G$ invariant, so $G$ acts by isometries in this metric, hence, $G$ embeds into $SO(n)$ for $n$ large enough.
The story for infinite groups is more complicated. Of course, there are groups of any preassigned cardinality, while any subset of $Gl(n)$ can have cardinality at most that of the real numbers. So, no sufficiently large group can embed into $Gl(n)$.
If you mix a bit of topology, then, for example, every compact Lie group embeds into $SO(n)$ for $n$ large enough, but the proof is not trivial. Noncompact Lie groups need not embed into $GL_(n)$ for any $n$. For example, I believe that the universal cover of $Sl(2)$ is such an example.
Finitely generated linear groups are residually finite. This is a deep result, due to Mal'cev (see here for a sketch proof), and it allows you to conjure up non-linear groups willy-nilly.
For example, the Baumslag-Solitar group $$BS(2, 3)\cong \langle a, t\mid t^{-1}a^2t=a^3\rangle$$ is non-residually finite, and hence non-linear. The proof that it is non-residually finite is not hard, and comes from combining the following two results. A group $G$ is Hopfian is every surjective endomorphism $G\twoheadrightarrow G$ is injective.
- $BS(2, 3)$ is non-Hopfian, as the map $a\mapsto a^2, t\mapsto t$ extends to a surjective but non-injective homomorphicm (see here).
- Residually finite groups are Hopfian (see here).
The question you are now asking is, of course, "are all finitely generated residually finite groups linear?". Well...no. There is a paper of Cornelia Drutu and Mark Sapir, where they prove that the group $$\langle a, t\mid a^{(t^2)}=a^2\rangle$$ is residually finite but non-linear.