Here the value in C1 is as follws:
=IF(A1<A2, A1-A2, 0)
The third value in the 'IF' statement (here 0) is the value that is returned if the condition is not met. Thus the Syntax would be: "=IF(Condition, Value if true, Value if false)".
You can get these formulas & their synatx, if you type "SHIFT+F3", & then the relevant formula is choosen.