Consider $\displaystyle \int_{-\infty}^{\infty} \frac{P(x)}{Q(x)} dx $ where $P,Q$ are polynomials and $x$ is a real variable. This converges absolutely if $\deg(P) \leq \deg(Q) -2.$ To evaluate this family of integrals, we consider $\displaystyle \int_C \frac{P(z)}{Q(z)} dz$ where $C$ is the standard semi-circular contour in the upper half plane with radius $R.$ The Estimation Lemma yields that the contribution from the arc is $\mathcal{O}(1/R)$ as $R\to\infty.$
Hence $$\int^{\infty}_{-\infty} \frac{P(x)}{Q(x)} dx = 2\pi i \sum \text{ Residues of P/Q in the upper half plane }.$$
When $\deg(P)=\deg(Q)-1$ this same calculation holds true, but now the calculated value does not represent $\displaystyle \int^{\infty}_{-\infty} \frac{P(x)}{Q(x)} dx$ ; that integral does not exist because we get different values if the upper and lower limits tend to infinity in different ways. What does exist (and we calculated) is the Cauchy Principle Value: $$\text{ C.P.V } \int^{\infty}_{-\infty} \frac{P(x)}{Q(x)} dx = \lim_{R\to \infty} \int^R_R \frac{P(x)}{Q(x)} dx.$$
If $Q$ has a simple zero at $x_0 \in \mathbb{R}$ our calculation still returns a value we can make sense of, another Cauchy principle value: $$\text{ C.P.V} \int^b_a \frac{P(x)}{Q(x)} dx = \lim_{\epsilon\to 0} \int^{x_0+\epsilon}_a\frac{P(x)}{Q(x)} dx + \int^b_{x_0-\epsilon}\frac{P(x)}{Q(x)} dx.$$