One line with gcc: Toggle the comment on the cursor line with gcc: comment it out, or bring it back if it's already a comment.
Several lines with gc{motion}: Comment out the lines shown in the target with one gc command: the operator plus a motion or text object.
Blocks that already have comments: Comment out the whole block in one go. Existing comments get a second //, and empty lines inside the range get a bare //.
Toggle again with .: Toggle the two places shown in the target. Do the first with gc, move, and repeat it with ..