If you are programming in BASIC, you use the SAVE command to save a file to a device.
Saving a Program to Cassette
Will write to a datasette (cassette recorder)
Will write to a datasette with a filename.
Saving a Program to Floppy Disk
Will save it to the 1541 drive, assuming it is the primary disk drive. Replace with ,9 for the secondary disk drive (or ,10 or ,11 for the 3rd and 4th drives)