What is the difference between the dimension of a group and the dimension of its representation?
An illustrative example.
The group $SU(2)$ is 3-dimensional. It's generated by the three Pauli matrices. $$\sigma_x = \left(\begin{matrix}0&1\\ 1 & 0\end{matrix}\right) \qquad \sigma_y = \left(\begin{matrix}0&i\\ -i & 0\end{matrix}\right)\qquad \sigma_z = \left(\begin{matrix}1&0\\ 0 & -1\end{matrix}\right)$$
These matrices act by multiplication on a $2$-dimensional vector space, the standard representation of $SU(2)$. The dimension of this representation is $2$.
The dimension of a Lie group is given equivalently by the dimension of its corresponding manifold, the dimension of its associated Lie algebra or the number of group generators.
On the other hand to understand what the dimension of a (linear) representation is we shall understand what a linear representation means. Group elements are abstract in the sense that they are defined by the way they act on certain objects. For example, the rotation group in three dimensions is given by operators that rotate three dimensional vectors. Given a linear representation, the group elements are appropriately mapped into linear operators which act on a linear space. The dimension of this linear space is the dimension of the representation. Recalling that linear operators acting on a linear space can be written as $n$x$n$ matrices, then we see that the dimension of the corresponding representation is $n$. The Lie algebra representation is also defined in the same way and this actually induces the group representation since group elements can be obtained by the exponentiation of the algebra.
In particular, the group $SU(N)$ has dimension $N^2-1$, since it has $N^2-1$ generators, and among others it has the so-called defining and adjoint representations which have dimensions $N$ and $N^2-1$, respectively. This is because the group $SU(N)$ can be defined as the set of $N$x$N$ unitary matrices with unit determinant and the adjoint representation of the algebra uses the algebra itself as the linear space for the representation.