You need a formula for this.
If the probability (in one toss) of getting head is "p", then
the probability of getting exactly k heads out of n tosses is:
(n,k) p^k (1-p)^(n-k)
where (n,k) denotes the number of combinations of k elements
among n.
You should also know that (n,k) = n! / (( n-k)! k! )
so here, with n=8, k=6, and p=.5 you have
(n,k) = 8*7 / 2 = 28
and your probability is :
28 * 1/2^6 * 1/2^2 = 28 / 256 = 7 / 64