The basic principles involved are quite simple; it is the algorithmic aspects that require attention in particular cases.
Assume a rational function R(X) in one unknown has denominator that factorises as P(X)Q(X) over a field K (we can take this to be real numbers, or complex numbers). If P and Q have no common factor then R may be written as A/P + B/Q for some polynomials A(X) and B(X) over K. The existence of such a decomposition is a consequence of the fact that the polynomial ring over K is a principal ideal domain, so that CP + DQ = 1 for some polynomial C(X) and D(X) (see Bézout's identity).
Using this idea inductively we can write R(X) as a sum with denominators powers of irreducible polynomials. To take this further, if required, write G(X)/F(X)n as a sum with denominators powers of F and numerators of degree less than F, plus a possible extra polynomial. This can be done by the Euclidean algorithm, polynomial case.
Therefore when K is the complex numbers and we can assume F has degree 1 (by the fundamental theorem of algebra) the numerators will be constant. When K is the real numbers we can have the case of degree F = 2, and a quotient of a linear polynomial by a power of a quadratic will occur. This therefore is a case that requires discussion, in the systematic theory of integration (for example in computer algebra).