|0 = standard input - normally keyboard.|
1 = standard output - normally console.
2 = standard error - normally console.
3 - 9 = generally not used/reserved/program specific.
Specifying the number tells the command processor where you want the output to go. Standard input and output are assumed when directing unless the number is assumed, so "echo text > file" assumes that the standard output will be redirected to file, this is essentially "echo text 1> file".
It is possible to redirect standard output to standard error or visa-versa.
1>&2 echo This is going to standard error!
2>&1 echo This is going to standard output, but so will any errors!
Nul is a special system object that basically takes input but does nothing with it (ever met a person that just loses everthing??) , so redirecting to nul gets rid of unwanted output.