This creates a tunnel via linux.cosc.canterbury.ac.nz to a database server called db2.csse.canterbury.ac.nz on the official MySQL port 3306. If you wanted you could always use ssh.canterbury.ac.nz in place of linux.cosc.canterbury.ac.nz. This example also creates local port 1234 on your computer which we can use to access the database server or to use our analogy, the entry to the portal/wormhole. The local port doesn't have to be 1234 and can be some other number that isn't already used on your computer. Port 1234 on your local computer merely maps across to port 3306 on the database server. You could, for example use local port 8888. You can even have multiple tunnels at the same time, to the same, or different computers. You just run the ssh command again changing the hostname of the computer you want to connect to and use a different local port number as appropriate.
After executing this command and completing the authentication process you might think the connection has hung because you don't get a command prompt. The tunnel is indeed open but this effect is a result of the -N parameter. The tunnel will remain open until you type Control-C on the keyboard.
With the tunnel established we can now connect to the database server using the mysql client as an example: