Typically, compression is done on the final save, when you're finished with your work and want to post it somewhere.
Normally, I scan in my picture as a .bmp; do all the manipulation I want to make with it on my graphics program (the gimp), such as coloring, cleanup, etc.; and then save it once as a full-size .bmp and then resize for my final, uploadable picture. Typically, I also have the cleaned-up scanned lineart saved as its own file.
For the actual compression, I first resize the picture. A good rule of thumb is to scale the picture so that a viewer doesn't have to scroll in order to see all of it. I typically prefer to make the height or width (whichever is longer) under 700 pixels across.
Next, I save it as either a .jpg or a .png. .Jpgs allows one to adjust how much the picture is compressed, but I don't like them as they tend to leave artifacts in the picture. In my opinion, .pngs are better. Though a person can't choose how much to compress a picture with a .png, it usually isn't a worry.