This is something I do just too rarely to remember the syntax, so I decided to write it down. Here it is:
To convert an image from color to grayscale (and save the result to a different file), type the following curse:
convert image1.jpg -colorspace Gray image1_grayscale.jpg
If you just want to overwrite the original image, use this command instead (thanks CableCat for the tip):
mogrify -modulate 100,0,50 image1.jpg