I was going through the probability and measure chapter of testing of hypothesis book by L.H. Lehman, where I found this "A class of sets that contains Z and is closed under complementation and countable unions is a σ-field". I was not able to understand closed under complementation in this matter. Any help would be appreciated.
Closed under complementation means that if a set $E\in\mathcal A$, where $\mathcal A$ is our $\sigma$-algebra, then we must have $E^c\in \mathcal A$ as well. Note that closed under countable unions and closed under complementation implies closed under countable intersection by De Morgan's laws.
If some set or class is said to be "closed under some operation", then any element of this set has its image in the same set under that specific operation as well.
In your case it means, if $A \in X$ then $A^c \in X$ for all $A \in X$.