InterPlanetary File System (IPFS) is a protocol and network designed to create a content-addressable, peer-to-peer method of storing and sharing hypermedia in a distributed file system. For a great introduction to IPFS concepts, please check out this blog post which gives both a high-level overview as well as a deeper dive into the technology.
Contrary to location based identifiers for files in HTTP, the content addressing system used by IPFS stores and retrieves data using an ID created from a hash of the content itself. This is known as a content ID. The protocol behind the content IDs used in IPFS is called Multihash, which has be designed to be modular and easily upgradable. Each hash is self-describing in that it specifies the hash function and length of the hash in the first two bytes of the multihash itself. For instance, at the time of this writing, content IDs for files on IPFS are prefixed with the letters
Qm which is the the result of the first two bytes in hex
1220 encoded in base58. 12 denotes that this is the SHA256 hash function and 20 is the length of the hash in bytes — 32 bytes. You can find more on the multihash protocol here.
Data stored in IPFS and named links gives the collection of IPFS objects the structure of a Merkle DAG , or DAG meaning Directed Acyclic Graph, and Merkle to signify that this is a cryptographically authenticated data structure that uses cryptographic hashes to address content.