In a three-digit number the digits go in columns.
Look at the number:
Put each digit in the columns like this:
So 345 is three hundred, four tens and five units, which is three hundred and forty-five.
And 504 is five hundred, no tens and four units, which is five hundred and four.