1. Toss the coin and remember the answer.
2. Toss the coin again, if it is different from your previous toss then your result from #1 is fair. Otherwise, go back to step 1.
If p is the probability of getting heads, there are four possible outcomes with their associated probabilities:
TT -> (1 - p)^2 (rejected)
HT -> p * (1 - p)
TH -> (1 - p) * p
TT -> p^2 (rejected)
Needless to say, p * (1 - p) and (1 - p) * p have an equal probability, so if we don't reject our two tosses, we have a fair outcome.