The documentation for the most convenient way to do it (there are others) is at:
http://www.gnu.org/software/emacs/manual/html_node/emacs/Key...