> How are stories ranked?
> The basic algorithm divides points by a power of the time since a story was submitted. Comments in threads are ranked the same way.
> Other factors affecting rank include user flags, anti-abuse software, software which demotes overheated discussions, account or site weighting, and moderator action."
and
> What does [flagged] mean?
> Users flagged the post as breaking the guidelines or otherwise not belonging on HN.
> Moderators sometimes also add [flagged] (though not usually on submissions), and sometimes turn flags off when they are unfair.
You might also find the guidelines helpful in answering your questions.