You compiled with xetex, which is not using the LaTeX format. That's why you got an "Undefined" error for all LaTeX commands, such as \documentclass and \usepackage. Simply change to XeLaTeX, which means running

xelatex cover_letter_2.tex

in the terminal, or use the corresponding editor setting for compiling in case you are using a LaTeX editor.