the permissions are interpreted by linux in octal numbers (from 0 to 7), if we start with basics, the octal number can be represened with 3-bit binary number (0 or 1), so lets see
octal binary
0 000
1 001
2 010
3 011
------------------
7 111
Now, every permission bit can be turned on with 1 and turned off with 0 in binary, so lets see
rwx is 111 (turn on r -> 1, turn on w -> 1 and turn on x -> 1) in octal it is 7
Part II (Intermediate).
s, S, t, T permissions are given a special attention
s - suid
S - sgid
and t and T are sticky bits
suid bit is 4, sgid is 2 and sticky bit is 1
If you want a program to run in a user space of the owner of the file suid bit is given, if you want it to run in user space of group - sguid bit is presented, and if you want a file to be created in the user space of the current user, then sticky bit makes sence, for instance /tmp directory has a sticky bit with full writtable, readable and executable permissions - what it means that you as a user can create files in the /tmp that will only can be at least writtable by the user they were created and nobody else except root.
Now, how would you set it up? well you give forth octal number to chmod directive (the first number), in reality it is always four octal digits in the permission set (if none of the suid, sgid or sticky bit is used that number is simply 0, so chmod 755 is equivalent to chmod 0755).
so to create sticky bit permissions on the directory (it is mostly used on drectories) you would use
chmod 1777 /tmp
so it will look like
drwxrwxrwt
I hope you are not confused.