See `Init File' in the on-line manual.
WARNING: In general, new Emacs users should not have .emacs files, because it causes confusing non-standard behavior. Then they send questions to help-gnu-emacs asking why Emacs isn't behaving as documented. :-)