the apt-get upgrade is executed to upgrade the actual packages that are installed, while the package index files are updated by running the apt-get update. Using these two commands, the list of packages and the Ubuntu operating system is updated and you can use the latest software, security patches, and technologies.