Koala is spot on.
it's like Aces High rankings. You get two rankings, one for short program, and one for the free skate. You add them together and get final rankings based on who has the lowest combined score, ties going to the higher free skate score. the kicker is the short program rankings are on 0.5 scale (0.5 for first, 1.0 for second, 1.5, etc...) and the free programs are on a 1.0 scale.
so Kwan had a 0.5 going in, while Hughes had 2.0 (for 4th in the short program). After Kwan skated her free program, she had a 2.5 (0.5 for 1st short, and 2.0 for 2nd free) and Hughes had 3.0 (2.0 for 4th and then 1.0 for 1st). The Russian comes in and skates and gets 2nd in the free. her scores are 1.0 and 2.0 for a 3.0 ranking, which is the same as Hughes. Kwan now has 3.5 ranking points, behind Hughes and Slutskaya. Since there was a tie for first, the gold goes to who had the best free skate, which was Hughes. Hughes wins the gold.
It's amazing what you can learn by going to espn.com!