The tangent function approaches infinity as it nears 90 degrees due to the behavior of sin(x) and cos(x), where cos(x) approaches zero. As x approaches π/2 from the left, tangent goes to positive infinity, while approaching from the right leads to negative infinity, illustrating a singularity. This phenomenon is classified as a pole in mathematical analysis, where a function behaves like (z-c)^{-1} at a specific point. In the context of the Riemann sphere, there is only one infinity, eliminating the distinction between positive and negative infinity. The discussion highlights the differences between real and complex representations of the tangent function.