As mentionned, free groups have many non-finitely-generated subgroups. Commutator subgroups are such an example (see here), but more generally it is known that, in a free group of finite rank, a normal subgroup is finitely-generated if and only if it is a finite-index subgroup (see here). For instance, we know that the normal closure $\langle \langle a \rangle \rangle$ is a non-finitely-generated subgroup of the free group $\mathbb{F}_2= \langle a,b \mid \ \rangle$.
In fact, the commutator subgroup of any free product $A \ast B$ turns out to be free of infinite rank whenever $A$ or $B$ is infinite (see here).
More generally, any countable group is embeddable into a 2-generator group (see here for a proof). Therefore, any countable non-finitely-generated group (such that $\mathbb{Q}$, the free group $\mathbb{F}_{\infty}$ of infinite rank or the group $S_{\infty}$ of bijections $\mathbb{N} \to \mathbb{N}$ with finite support) appears as an infinite-index subgroup of a finitely-generated group.
Another source of examples comes from wreath products. For instance, let $L_2$ denote the lamplighter group. Then $$L_2 = \left( \bigoplus\limits_{n \in \mathbb{Z}} \mathbb{Z}_2 \right) \rtimes \mathbb{Z},$$ so the subgroup $\bigoplus\limits_{n \in \mathbb{Z}} \mathbb{Z}_2$ is clearly not finitely-generated whereas $L_2$ turns out to be finitely-generated.