Find S
Let S be the sample space of all possible outcomes of flipping a coin 6 times.
$|S| = 2^6 = 64$
Find A
Let A be the event that the coin comes up heads exactly 3 times.
We choose 3 of the 6 flips to be heads: $\binom{6}{3} = 20$
The remaining 3 flips must be tails: 1
Find $ \Pr(A) $
$ \Pr(A) = \frac{|A|}{|S|} $
$ \Pr(A) = \frac{20}{64} = \frac{5}{16} $