The Borel-Cantelli lemma and many other statements in probability theory involve statements concerning the limit superior and limit inferior of a sequence of sets (e.g. events). Recall that for a sequence of real numbers $\{a_n\}$, the lim sup and lim inf are defined as $$ \begin{align*} \limsup_{n\rightarrow\infty} a_n = \lim_{n\rightarrow\infty} (\sup_{m \geq n} a_m ) \qquad \liminf_{n\rightarrow\infty} a_n = \lim_{n\rightarrow\infty} (\inf_{m \geq n} a_m ) \end{align*} $$ Now we are given a sequence $\{A_n\}$, where each of the $A_n$ is a set. We extend the definition of lim sup and lim inf to the following $$ \begin{align*} \limsup_{n\rightarrow\infty} A_n = \bigcap_{n=1}^{\infty} \bigcup_{m=n}^{\infty} A_n \qquad \liminf_{n\rightarrow\infty} A_n = \bigcup_{n=1}^{\infty} \bigcap_{m=n}^{\infty} A_n \end{align*} $$ This is a somewhat strange looking definition. But it actually makes a lot of sense written out in English.
Limit superior. Let $x \in \limsup A_n$. Then for all $m \geq 0$ there exists $n \geq m$ such that $x \in A_n$. We often say $x$ happens infinitely often (abbreviated i.o.)
Limit inferior. Let $x \in \liminf A_n$. Then there exists $m \geq 0$ such that for all $n \geq m$, $x \in A_n$. We often say $x$ happens all but finitely often.
Unsurprisingly, the difference here can be viewed as switching the order of the existential quantifier!
Now we leave with a simple lemma (Ex. 2.3.1 of Durrett). For any probability measure $P$, we have that $$ \begin{align*} P(\liminf A_n) \leq \liminf P(A_n) \leq \limsup P(A_n) \leq P(\limsup A_n) \end{align*} $$
Proof. Suppose $\limsup P(A_n) = M$ and let $\epsilon > 0$. This means there exists a sub-sequence $\{A_{n_k}\}$ such that $\{P(A_{n_k})\} \rightarrow M$, which means there exists $N$ such that for all $n_k \geq N$, we have $| P(A_{n_k}) - M | \leq \epsilon$. But this means there must be a set of measure at least $M - \epsilon$ which occurs infinitely often, and therefore $P(\limsup A_n) \leq P(\limsup A_n) + \epsilon$. Since $\epsilon$ was arbitrary, we can take $\epsilon \rightarrow 0$ and establish the right-most inequality. To establish the left-most inequality, note that any $\cap_{m=n}^{\infty} A_n$ is a subset of any converging subsequence $\{A_{n_k}\}$, which means the union is also a subset. Therefore $P(\liminf A_n)$ is bounded above by the limit of $\{P(A_{n_k})\}$ for any convergence subsequence $\{A_{n_k}\}$. Finally, note that the middle inequality is always true for lim inf and lim sup of sequences.