Some parts of this answer are taken from the 2009 Stack Overflow blog post Comments: Now with Flags and Votes. Note that flagging has changed considerably since that blog post.
You need 15 reputation to upvote comments.
Upvote a comment by clicking on the up arrow that appears when you hover the mouse over the comment.
There is no downvoting of comments, only upvotes.
You get 30 comment upvotes per day.
- Automatic comment upvotes when voting to close questions do not count toward the limit.
Comment votes do not affect comment sort order.
When there are many comments on a post, some comments are hidden when the page loads, and there is a button to “show N more comments”. The comments with the fewest upvotes are hidden first. The threshold depends on the number of comments on the post and whether the site is a main or meta site.
When the question reaches a certain threshold of answers (30 on most sites), all comments with zero votes on both the question and all answers will be collapsed.
No reputation of any kind is earned or lost from comment votes, though the Commentator badge is awarded for leaving 10 comments, and the Pundit badge is awarded to those who left 10 comments, each with a score of 5 or more.
Comment upvotes can only be undone for a short time and while you did not navigate away from the page. Once you undo the upvote, you cannot upvote the same comment again.
You cannot upvote a comment that you've flagged, until the flag is dismissed.
You cannot upvote comments on locked posts.
No rate limit on comment votes, meaning you can upvote as fast as you want.
You have as many comment flags per day as you do post flags. Comment flags are counted separately from post flags.
A comment flag counts the same as a post flag for calculating the amount of daily flags earned from net helpful flags.
If a comment is flagged by a sufficient number of users, it will be automatically deleted. There is no penalty for this. Flagged comments will be surfaced to moderators, so if you have a problem with a comment, flag it.
If the comment has no upvotes and no "trigger" keywords, three flags from users will delete it.
If the comment has upvotes, it will require more flags to be automatically deleted: one more flag for every 3 upvotes, rounded up. (For example, a comment with 1 upvote requires 4 flags to be auto-deleted, and one with 8 upvotes requires 6 flags).
Comments containing certain "trigger" keywords are deleted instantly after a single flag, regardless of upvotes. The list of trigger keywords is kept secret, and may differ per site.
A single flag from a moderator will instantly delete the comment.
You can always delete your own comments by clicking on the "Delete" button that appears when you hover the mouse over the comment. This is not a flag; it takes effect immediately.
Flag a comment by clicking on the flag icon that appears when you hover the mouse over the comment. You'll need to choose a reason (see below).
Comment flags can be retracted; however, if your flag was one of the canned options and you retract it, you can't choose that flag option again for that comment.
If not handled by a moderator or automatically deleted, "harassment, bigotry, or abuse" comment flags age away after 4 days.
Comment flags do not affect the commenter in any way if a comment gets deleted, but they do count towards the flagger's helpful flags. A declined comment flag will not count toward a flag ban, but it does count toward one's net helpful flags and can reduce the flagger's daily flag allowance.
Flagging has a rate limit. You can flag a comment once every 5 seconds, and open the flag dialog once every 3 seconds. (More details here.)
Moderators can either mark flags as helpful and delete the comment, or leave it intact and decline the flag. They cannot manually dismiss comment flags, so borderline flags may be marked declined (though some mods may go through the extra step of marking it as helpful and then manually undeleting it). Also, they cannot provide a reason for dismissing a comment flag.
You cannot flag your own comments.
When should I flag a comment?
You must specify a reason for each comment flag. The dialog offers a few pre-filled reasons that cover most common cases:
It contains harassment, bigotry, or abuse.
The comment attacks a person or group.
It's unfriendly or unkind.
The comment is rude or condescending.
It's no longer needed.
This comment is outdated, conversational or not relevant to the post.
A problem not listed above. Try to be as specific as possible.
See also When should comments be deleted?.