Select the code you want to comment on, press Command, K, and C. If you want to uncomment, it's simple: press Command, K, and U. That's all.