To break down the numbers:
1 - read
2 - write
4 - executable
add them together and you get the setting in order of: owner, group, else
So 755 is (1+2+4)owner, 7 who can do all three... group and world only have 5, readable and executable, 1+4.
If you're using a fourth number that first one refers to the sticky bit, a setting of 4 makes it so that the file, when executed, runs as the owner, not the user that executed the file. There are a bunch of stick-bit settings and I don't remember them all, but needless to say a file that is 4777 and is owned by root is a nuclear bomb because anyone can write the file and then execute it as root.