All NFTs are stored on the Tezos blockchain stored using the FA2 token standard.
All assets (HTML / JavaScript files) are stored on IPFS. The "InterPlanetary File System" is a protocol and peer-to-peer network for storing and sharing data in a distributed file system. IPFS uses content-addressing to uniquely identify each file in a global namespace connecting all computing devices.
To preserve the files, pinning is the mechanism that allows you to tell IPFS to always keep a given object somewhere. My advice is to pin your assets if you don't want to be dependent on external services.