Just an explanation of guest's answer
You have four digits
_ _ _ _
The first digit has 9 choices, because it can't be 0. So 1 through 9 will be 9 choices.
The second will also be 9 choices. This is because it now can include 0 but also excludes the previous digit.
The third digit has 8 choices, because it excludes the previous 2 digits.
The fourth digit has 7 choices, because it excludes the previous 3 digits.
So 9 * 9 * 8 * 7 = 4536