Since I've been writing code to interact with various systems' disk image formats over the past few weeks I'd like to add a little more information that's not in the current answers.
Disk images and tape images are usually of a few different types and subtypes. I'm using my own terminology here so forgive me if there is standard terminology that I'm not aware of.
Disk images
- "High level": These typically represent the physical tracks and sectors of a disk. Sometimes they might represent logical tracks, sectors, and/or blocks though. The two main subtypes I might call "raw" and "headered". "Raw" images expect the tools using them to know things such as the disk geometry (number of sides, tracks, sectors, etc) or be able to correctly derived them from external metadata such as the file's size and extension. "Headered" images provide extra information such as a magic word identifiable signature, version number, information about the geometry, etc.
- "Low level": These typically represent the disk as the drive controller sees it. These typically allow disks with various kinds of copy protection to be represented. There will often be several low-level image formats or versions as emulator writers find games or tricks that earlier image formats are unable to represent. These also come in "raw" and "headered" subtypes.
- "Very high level": These represent the filesystem rather than the disk geometry. Sometimes just a collection of files with their metadata (filename, datestamp, machine code vs BASIC vs binary data, etc.)
Tape images
- "Audio". These represent the sound of the tape to a high enough fidelity that it can be played as a sound for a real computer to interpret as though it's connected to a tape player, or to be converted to an accurate byte representation. They may just be a plain existing audio file format such as WAV, or have a wrapper or extra header. Just like a real tape it could include multiple programs or even analogue audio such as speech and music.
- "High level". These represent the data directly, rather than the sound. They can be loaded into an emulator without having to go to the trouble of emulating the audio of the tape player, but there are usually features of the emulator or other tools to convert them to audio. They are usually "headered", but that extra information can vary from very minimal to more extensive to cover custom speedloaders, multiple files on a tape, etc.
In the case of .d64
, .d71
, and .d81
, they are all "high level" "raw" disk image formats, and are all closely related in the same family. A program implementing one can fairly trivially be extended to work with the others.
As for .t64
, it's a "high level" "headered" tape image format which includes quite a bit of structured metadata about the data on the tape.