When working with XeLaTex (the xelatex command) you need to compile the LaTeX source from a terminal (Unix/Linux/MacOS) or from the command prompt (Windows).
As I frequently use XeLaTeX and I edit LaTeX source with Emacs and AucTeX, I added a small customisation line in the .emacs file so that I can run the command inside Emacs, invoking Ctrl-C Ctrl-C and selecting XeLaTeX as the compiler. Here is the small command line to add to your .emacs file
(eval-after-load "tex" '(add-to-list 'TeX-command-list '("XeLaTeX" "xelatex -interaction=nonstopmode %s" TeX-run-command t t :help "Run xelatex") t))
Why do you want to use xelatex instead of latex or pdflatex?
Well, first because xelatex produces .pdf files as pdflatex but it allows for more registers: the stuff you don’t want to see, but which occasionally disturb you, especially when compiling complex documents like slides with Beamer plus a lot of fancy mathematical packages, e.g., XY-pic.
Second, xelatex together with fontspec allows to access and to use the native fonts of your system: in short, when publishers ask you to use the horrible Times New Roman instead of the “real” Times, well, you can just do it with a couple of declarations in the preamble!
Essentially, all TrueType fonts are supported, so you don’t have to perform strange TeX magic to use them in your documents (BTW, I’ve always had problems in doing those magic, at least on Windows machines).