I usually start a download before I go to school.
Which command should I use to automatically make the necessary saves and turn off the computer after a particular task has been completed?
(Say, after installing the updates, or after downloading a large file.)

Alternative to this is using kshutdown - in this app you can specify what action should be done (reboot/shutdown/hibernate/etc or command execution) and when (after some time or when another application exits). If you want to use this tool you need to chose correct process - some update utilities starts few subprocesses.

You can use the && and || operators to chain commands together. For example:

apt-get update && sleep 2 && init 0

which will perform an update to the system using aptitude, wait 2 seconds, and go to runlevel 0, depending on your system this may or may not actually power off the hardware.

To speak to one or more operations following a more arbitrary operation, such as a, presumably web browser, download you would require additional logic to watch the downloading file to verify that the download has in fact completed, however, the shell logic is unchanged.

Every process has a directory named according to its process id (pid) in the proc filesystem. Therefore you can wait for a specific process' termination by checking whether its directory exists repeatedly.

You can use this to perform a system shutdown after process termination like this (replace 2296 by the pid to wait for):

su -c 'while [[ -d /proc/2296 ]]; do sleep 1; done; poweroff'

Advantages:

You can decide whether or not to shutdown after setting off the shell command

The shutdown is issued as root, the command to wait for is not necessarily done as root (no need to workaround the late sudo-password prompt).