The idea
A chemical formula uses element symbols and subscripts. Parentheses apply the outer subscript to every atom in the enclosed group.
How many oxygen and hydrogen atoms occur in one formula unit of Ca(OH)₂?
The subscript 2 multiplies the entire OH group. That gives two oxygen atoms and two hydrogen atoms.