$ ssh -L x:localhost:y snoopy
means "Start an SSH connection to snoopy, and also listen on port x on my machine, and forward any connections there to port y on snoopy."
imagine you had a VNC server running as display :1 on machine snoopy, and you wanted a secure connection to it from your local machine. You could start the ssh session using:
$ ssh -L 5901:localhost:5901 snoopy
$ vncviewer localhost:1
$ ssh -L 5902:localhost:5901 snoopy
$ vncviewer localhost:2