Imagine tha the each numeral of the code is written over each line:
__ __ __ __ __ __
1 2 3 4 5 6
Every position may have any of the 10 different numerals.
So over the first line you can put 10 different numerals and the same is true for each of the six positions.
So you can create 10x10x10x10x10x10 = 1,000,000 different codes.