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

chown joe test.fil changes the ownership of file test.fil to user joe