chmod is used to
change the file mode bits
The format of a symbolic mode is [ugoa...][[-+=][perms...]...], or perms is zero or more letters of the set rwxXst, or only one ugo set letter. Several symbolic modes can be given, separately evaluated by commas.
man or reference manual page for
The + x tells chmod to set the parameter
perform (or search for directories).
The $ 1 is usually used in scripts to designate the first parameter passed to the script. ($ 0 refers to the script itself) however if a
shift has been executed, the parameters may have changed, so it is the first one at the moment of execution.