Start by writing a function that extracts each digit from the number.
When you have that working, loop through each digit comparing them:
1) Set a "max value so far" variable to a "not the biggest value" (integer minimum value for example, of the first digit minus one).
2) Loop through all digits
2.1) Compare them against the "max value so far".
2.1.1) If the digit is bigger, set "max value so far" to the digit.
2.2) Move on to next digit.
3) After the loop, the largest digit is "max value so far".
Try it: it's not complicated!