Binomial probability states that the probability of x successes on n repeated trials in an experiment which has two possible outcomes can be obtained by
(nCx).(p^x)⋅((1−p)^(n−x))
Where success on an individual trial is represented by p.
In the given question, obtaining heads in a trial is the success whose probability is 1/2.
Probability of 6 heads with 6 trials = (6C6).((1/2)^6).((1/2)^(6–6))
= 1/(2^6)
= 1/64