@Rudy-Trujillo The middle two commands with tar essentially moves everything from /overlay to /mnt. The reason why this method was used instead of a simple cp -r was because this way all the timestamp and ownership of the files and directories are preserved.
The way it works is essentially getting tar to create a compressed version of all files in /overlay. The compressed data is then passed via the pipe to another tar command, which decompresses that in the /mnt directory. Note that instead of taking a filename as the argument in the second tar command, it reads directly from stdin.