\infty is in base LaTeX and needs no package. It appears most often in limits, integral bounds and interval notation. The cardinal infinities of set theory are a different symbol, \aleph.
All ways to write it
\inftyNo package needed-\inftynegative infinityNo package needed\lim_{x \to \infty}in a limitNo package needed\aleph_0aleph-null, countable infinity ℵ₀No package needed
Example
\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}The Basel problem.
Questions
How do I write an infinite interval?
(-\infty, a] or [a, \infty). Infinity is always open, so use a parenthesis on that side.
Using infinity in Confluence
Confluence Cloud has no built-in LaTeX. With LaTeX Math for Confluence you add a math macro to any page, type \infty and it renders inline or as a block, with a live preview while you edit. Every command on this page renders there without extra packages.