Snap is a sandboxed environment to install applications in.
Flatpak is a more portable implementation of the same broad idea, it downloads a chroot and runs applications from within using a separate program called bubblewrap (one could, in theory, use chroot to run apps from within the downloaded flatpak images, bubblewrap offers further isolation through things like namespaces and cgroups etc. )
Snap, unlike flatpak, is a Canonical specific implementation that has a reputation for breaking a lot of things.