There are two common ways to "compactify" the reals.
The first is the one you're probably more familiar with. You add two additional points, $+\infty$ and $-\infty$, located at the two "ends" of the number line. This is called the extended real line. Commonly, the notation $\infty$ is used instead of $+\infty$: thast causes some confusion with....
The second is called the projective real line. It adds only single point $\infty$, which is located on both ends of the line (think of the two ends being glued together to form a circle). This is closely related to the Riemann sphere and "complex infinity". This construction tends to be more useful when you're working with polynomials and rational functions, or when doing complex analysis. If we view $\tan$ as function from the usual real line to the projective real line, then we can continuously extend it so that $\tan(\pi/2) = \infty$.