This question can be solved using a tree diagram. First we need to map out the two possible outcomes from the question:
H=heads T= tails. The first scenario is HHH, as the probability of H each time is 1/2 we multiply 1/2 * 1/2 * 1/2 to get 1/8
The second scenario is THT, again the probability of tails is the same so we multiply 1/2 * 1/2 *1/2 to get 1/8
As the question stated that it is the probability of scenario 1 OR scenario 2 we summ the probabilities to give a final answer of 1/4