on page 3 in recitation 5 (pac-learning): why does

(1)\begin{align} \Pr [error > \varepsilon] \leq \Pr [\exists i =1,2,3,4 \forall x \in S, x \notin T_i ] \end{align}

?

and what the algorithm does on every sample it gets? It does not clear to me from the scribes. thanks:)