In most varieties of English, disk is the preferred spelling for magnetic media (hence floppy disk, hard disk, disk drive), whereas disc is preferred for optical media (hence compact disc, digital versatile disc, optical disc). For all other uses, disk is preferred in American English and acceptable in Canadian English, and disc otherwise.
Less commonly, disc is used for magnetic media (as in floppy disc and discette; similarly, disk is sometimes used for optical media, as in compact disk and optical disk.
The reason for this is actually pretty interesting though. Historically it was just a US/UK English difference, but it evolved into both being used because one of the first big manufacturers of optical discs, Philips, called them discs, while the US-based IBM spelled their magnetic disks with a K.