As far as I know, a representation is a homomorphism from the group to a vector space $V$ which preserves the group multiplication, i.e., if $(\pi,V)$ is a representation of the group $G$, then whenever $g_1,g_2\in G$ and $g_1\cdot g_2 = g_3$ then
\begin{equation} \pi(g_1)\pi(g_2) = \pi(g_1\cdot g_2). \end{equation}
In Matthew Schwartz's QFT and the Standard Model, chapter 8 titled Spin 1 and Gauge Invariance, he says (page 110) that fields $\phi(x)$ form a representation of the group of translations because $\phi(x) \to \phi(x+a)$. I did not understand how this works and how one would define the group multiplication law.
After some scrounging and stumbling across Peter Woit's book, I found the following definition of a representation on a functional space (page 7, eq. (1.3)): given a group action of $G$ on a space $M$ (given as a set of points), functions on $M$ come with an action of $G$ by linear transformations $\pi$ given by \begin{equation} (\pi(g))f(x) = f(g^{-1} \cdot x). \end{equation} This made me conclude that it is better to think of the fields as being the 'vector' space on which the linear transformations associated with the group acts. Therefore since this 'vector space' is infinite-dimensional, I would think that it has infinite degrees of freedom. But what Schwartz says the problem is that the degrees of freedom are the indices that the fields carry (i.e. a vector field $A_\mu(x)$ has 4 d.o.f., tensor field $T_{\mu\nu}$ have $4\times 4 = 16$ and so on) and the problem is to embed the proper spin $J$ d.o.f. which are $2J+1$ in number into these fields. I do not understand how the indices are actually the d.o.f. but not the fields themselves. Can someone explain?