It's just like running a webserver, but with content-based addressing, the possibility of having multiple machines provide the same content and much more convenient mirroring than over HTTP.
If you start an IPFS node, it'll remain empty until you upload something, or pin (copy) somebody else's content.
I think your node might also cache requests you make to it for some time, but that's also something that's a result of you asking for it.
In Freenet you contribute to a global pool of storage, and end up storing and transmitting whatever the network happens to need. Freenet is intentionally obscure about it. The archive is encrypted, there are no logs, there's no way to list what your node contains, and storage is probabilistic making it hard to determine if something is there because you asked for it, or it passed through your node.
Tor also tries something similar, and has premade explanations to give to authorities if they ask about your exit node.
But those are specifically built to try to work with that case. Stuff happens behind your back that you have zero involvement in besides providing a piece of infrastructure for the network.
In IPFS on the other hand you make a personal, intentional choice to mirror or upload something.
Tor nodes themselves also don't host any data.