Chocolatey packages contain all necessary files, e.g. installs, zip-files, scripts, etc., in one compiled package. During package installation, Chocolatey checks for dependencies (specified during package assignment in RealmJoin) and takes care of those, silently installing the needed packages.
Chocolatey uses NuGet.Core to retrieve packages from the source. Before installing, Chocolatey takes snapshots, then runs automation scripts (PowerShell) if provided in the package.