If you are using Putty then you can set up the tunnel for a session in the Connection > SSH > Tunnels tab. Make the source port L5902 and the Destination 127.0.0.1:5901.
You will need to set up the session to save these details. This will have you connecting to vnc window 1.
From command line you can use ssh -L5902:127.0.0.1:5901 user@target this does the same thing as what putty is doing i believe.
I dont know enough to give much more of an explanation to this but i hope it helps.