Each file has an assigned set of mode bits, ownership (user and group), and flags. To view these assignments, run the command ls -lo and get a result like this (only one file is shown)
-rw-r--r-- 1 root wheel sappnd,arch 2188 Sep 17 2003 junk.test
The first grouping of characters represent the modes assigned to the file.
root is the file's owner
wheel is the file's group
sappnd,arch are the file's flags
chmod changes the file's mode
chown changes the file's owner
chgrp changes the file's group
chflags changes the file's flags
chgrp wheel test.fil changes the group ownership of file test.fil to wheel