Disclaimer: Renormalization is a huge subject with many facets, such as, e.g. overlapping divergences of subgraphs, regularization, renormalization group, etc. Here we will only elaborate on OP's quote from Ref. 1.
Ref. 1 is considering a Feynman diagram ${\cal F}(q_1, \ldots, q_E)$ in momentum Fourier space, with external 4-momenta $(q_1, \ldots, q_E)$, and with internal 4-momenta $(p_1, \ldots, p_I)$, which are integrated over. The $p$-integrations are assumed to be UV divergent with positive superficial degree of divergencesuperficial degree of divergence (SDOD) $D\geq 0$. Concerning SDOD, see e.g. my related Phys.SE answer here.
Here $E=\sum_f E_f$ is the total number of external lines, and $E_f$ is the number of external lines of field type $f$.
If we differentiate the Feynman diagram $D+1$ times wrt. the external 4-momenta, the integrand becomes UV finite. We conclude that the divergent part of the original Feynman diagram ${\cal F}(q_1, \ldots, q_E)$ is a polynomial in $(q_1, \ldots, q_E)$ of order $\leq D$. Note that the coefficients of the polynomial are possibly infinite!
We next add new interaction terms to the Lagrangian density ${\cal L}$ corresponding to $E$-vertices with $E_f$ fields of field type $f$, and possibly a finite number of spacetime derivatives (which in momentum Fourier space becomes a momentum monomial). The new interaction terms are so-called counterterms.
Feynman instructs us to sum over all Feynman diagrams with $E_f$ external legs of field type $f$. In particular, we should also include diagrams consisting of a single $E$-vertex coming from the new interaction counterterms. By adjusting possibly infinite coupling constants in front of the new interaction counterterms, the full Feynman diagram can be made finite.
References:
- S. Weinberg, Quantum Theory of Fields, Vol. 1; Section 12.2, p. 506.
S. Weinberg, Quantum Theory of Fields, Vol. 1; Section 12.2, p. 506.
M.E. Peskin & D.V. Schroeder, An Intro to QFT, 1995; Section 10.1, p. 319.