Each rwx triplet (owner, group, other) is represented by the binary bits 421
When you specify a charmod setting there is 1 digit for each triplet which is the sum of the bits in that triplet
So, say the owner has Read and write privileges
The sum of the bits is 4+2+0 = 6, so the Owner Triplet is 6
Now, lets say the group has read priveges and execute privileges:
or 4+0+1= 5. The second (group) triplet is 5.
Finally, other users have execute only privileges:
or 0+0+1 = 1, the other triplet value is one
so, you combine the values for the triplets for Owner, Group and other to give:
chmod 651 .....
Common values are:
777 everybody has rwx
755 Owner has rwx, everyone else has r-x