Consider the general rational function $R(x) = \frac {P(x)}{Q(x)}$ where $P$ and $Q$ are polynomial functions ($Q \ne 0$).
Understanding the behavior of $R$ involves examining both its zeroes and poles which are finite in number and connected to linear factors raised to powers.

In its factored form, $R$ is expressed using powers of linear functions, $P_j(x) =(x- r_j)^{p_j}$,  with $ j = 1,2, ... , m$, and a monic polynomial $g_P$ which has no real roots in the numerator and $Q_i(x) =(x- s_i)^{q_i}$,  with $ i = 1,2, ... , n$, and a monic polynomial $g_Q$ which has no real roots :

$R(x) = \frac {P(x)} {Q(x)} =\frac {A_P*P_1(x)*P_2(x)*...*P_m(x)*g_P(x)} {A_Q*Q_1(x)*Q_2(x)*...*Q_n(x)*g_Q(x)}$ 



The importance of the roots and poles of $R$ to the general behavior of $R$ near the roots and poles is covered in most 2nd and advanced courses in algebra.
Consider numbers $x_-$ and  $x_+$ close to $t$, a root or a pole of $R$, with $x_+ >t$ and $x_-<t$. One of two things can happen:
  1. $R(x_+)*R(x_-) >0$ or
  2. $R(x_+)*R(x_-) <0$.
These cases determine the behavior of $R$ close to $t$. 

When $t$ is a root of $R$ , $R(x_+)*R(x_-) >0$  if and only if $t$ is a local extreme point of $R$.

When $t$ is a pole of $R$  and $t$ is not a root of $P$, $R(x_+)*R(x_-) >0$  if and only if $R$ is unbounded positive close to $t$ or $R$ is unbounded negative close to $t$. [A "vertical line" asymptote for the graph of $R$.]

When $x$ is very large in magnitude - either positive or negative-  the relative degrees of $P$ and $Q$ determine the behavior of $R$.
Suppose the degree of $P$ is $d_P$ and the degree of $Q$ is $d_Q$. There are three cases:
  1. If $d_P > d_Q$ then the values of $R$ are unbounded when $x$ is very large in magnitude. In this case the long division of polynomials determines a polynomial $P_Q$ where when $x$ is very large in magnitude, $R(x) \approx P_Q(x)$.
  2. If $d_P < d_Q$ then $R(x) \approx 0$, when $x$ is very large in magnitude.
  3. If $d_P = d_Q$ then $R(x) \approx \frac {A_P} {A_Q}$ when $x$ is very large in magnitude.
In case 1 the graph of $R$ will appear very close to the graph of the polynomial $P_Q$. This is described by saying "the function $R$ has a polynomial asymptote."
In cases 2 and 3 the graph of $R$ appears very close to the graph of the horizontal line $y = 0$ or $ y = \frac {A_P} {A_Q}$. This is described by saying "the function $R$ has a horizontal asymptote."

The following examples of mapping diagrams for rational functions visualize these behaviors and help with understanding further the meaning of the shape of the graph of $R$.

Example OAF.BRF.1 : $R(x) = \frac {x-2}{x+1}$.

Example OAF.BRF.2 $R(x) =\frac {(x-2)^2} {(x+1)^2}$.

Example OAF.BRF.3 : $R(x) =\frac {x-2}{(x^2+1)(x+1)}$.

Example OAF.BRF.4 : $R(x) =\frac {(x-2)^2}{x^2(x+2)}$.

Example OAF.DRF.0 : Dynamic Visualization for a Rational Function $f(x) =\frac {P(x)}{Q(x)}$: Graphs and Mapping Diagrams