Not able to understand this graph for rational function . I am not getting why there are 3 lines drawn in that way .
If $x=2$ or $x = -2$ you get $\frac {x^2-3x-2}{x^2 - 4}$ will have $x^2 - 4 = (\pm 2)^2 -4 = 0$ and the whole thing is undefined and can not be plotted.  For values where $x$ is close to $0$ then $x^2 - 4$ will be very small in magnitude and so $\frac 1{x^2- 4}$ will be very large in magnitude and the function will stretch to very large positive or negative values and as $x\to 0$ the $|\frac {x^2-3x-2}{x^2 - 4}| \to \infty$.  The vertical lines $x =2$ and $x=-2$ are the vertical asymptotes and as $x$ is very close to $\pm 2$ the graph will get very close to those vertical lines.
$y = 1$ is the horizontal asymptote.  As $x$ gets very very large then the the proportional difference between the numerator and the denominate will get insignificant and the value of $\frac {x^2 - 3x-2}{x^2 -4}$ will get closer and closer to $1$. (for example if $x=10$ you have $\frac {x^2-3x-2}{x^2-4} =\frac {100-30 -2}{100 -4} = \frac {68}{96}$ but and $x =100$ you have $\frac {x^2-3x -2}{x^2 - 4}=\frac {10000-300 -2}{10000 - 2}=\frac {9698}{9992}$.)
More formally $\frac {x^2 -3x -2}{x^2 - 4} = \frac {x^2 -4 -3x +2}{x^2 -4}=1 -\frac {3x-2}{x^2-4}$ and as $x \to \pm \infty$ we have $\frac {3x-2}{x^2 -4} \to 0$.
so the graph gets close to $y=1$ for large positive and negative values of $x$.
This is the nature of assymptotes.  It's pretty important you understand them.  Keep studying.
As the final sentence above &quot;Example 2&quot; says, those are the asymptotes of the function, lines which the graph approaches as $x$ approaches $\pm\infty$, or as $x\to\pm2$ (in which case $y$ approaches $\pm\infty$).