They complement each other and work together.
IPFS and the Blockchain are a perfect match! You can address large amounts of data with IPFS, and place the immutable, permanent IPFS links into a blockchain transaction. This timestamps and secures your content, without having to put the data on the chain itself.
This creates a sort of beneficial relationship between the two technologies. Since blockchain technology is not fit to store large amounts of data, the IPFS can be used by blockchain applications that need a publicly accessible database. While the immutability provided by miners and the transparency of the blockchain, make it the perfect place to timestamp content and make it publically verifiable.
You can read some more about it here:
https://www.deepdotweb.com/2017/05/09/the-ipfs-and-the-blockchain/