This article is from the Macintosh hardware FAQ, by Elliotte Rusty Harold firstname.lastname@example.org with numerous contributions by others.
Normally you don't need to. Several companies sell floppy drive
cleaning kits that consist of nothing more than a disk and some
cleaning fluid for anywhere from five to twenty-five dollars.
These are almost as pointless as the CD cleaning kits sold to
overenthusiastic CD owners. I'd only use one of these if I was
already experiencing problems that were identifiably linked to the
floppy drive rather than individual disks. Cleaning a floppy drive
should not be part of normal maintenance. When you do need to clean
a floppy drive, Apple recommends the 3M floppy drive cleaning kit.
If you have a vacuum cleaner designed for electronic equipment, you
can always run it across the floppy slit, but even that is rarely
necessary. Or you can disassemble the Mac and use a can of
compressed air to blow the dust out of the floppy drive. Don't do
this without disassembling the Mac first though since otherwise
you'll just blow dust deeper inside your computer. And even when the
Mac is taken apart, be careful to blow the air AWAY from the motor.
If you blow air into the drive motor, you'll forcing dust into it and
make the drive more likely to fail.