How do the story and comment rankings work?

story rankings

comment rankings