You essentially customize Emacs by writing Emacs lisp, either by your self or by Emacs.
Emacs save its customization on "~/.emacs" or under directory "./.emacs.d". When Emacs start, it read and eval the lisp program in the file.
Easy Customization Interface
You can customize Emacs without explicitly writing code. with M-x customize, a customized buffer is created. User can change the variable, function and add Hook. By doing that, Emacs writing the customization to your initial files.