Divide the coins into three groups of 4 coins each. First, weigh two of the groups. If they balance, then the fake coin is in the third group, so take three of the coins, and weigh them against three of the coins that we know for sure are real (from the first 8 coins). If they balance, then the remaining coin is the fake one, but we still don't know if it is lighter or heavier, so weigh it against a real coin to determine that. But if it didn't balance, then we know that the fake coin is one of the three, and we also know if it is lighter or heavier, because we know which side had the real coins. So weigh two of the coins against each other, if they balance then the third coin is fake, if they don't balance we know which coin is fake, because we already know if it is lighter or heavier.
Now let's go back to the first weighing; if the two groups didn't balance, we know that the fake coin is in one of the groups, but we don't know which group. Let's mark the group that was heavier as group A, and the group that was lighter group B. For the second weighing, weigh two coins of group A and one coin of group B, against the other two coins of group A and one coin of group B. If they balance, the fake coin must be one of the remaining two, and a weigh between them will tell us which one (they are both from group B so we know that it's lighter). If the second weigh didn't balance, look at the side that is heavier: Either the fake coin is one of the two group A coins, or it can the group B coin on the other side of the scale. Take the two group A coins, and weigh them against each other. If they balance, then it is the group B coin that is fake, and if they don't balance, then the heavier one is the fake coin.
And that's that. We have covered all possibilities.
Today's brain teaser courtesy of Braingle.com.