It's all explained in the Bash Manual in the section titled "Bash Startup Files": http://www.gnu.org/software/bash/manual/bashref.html#Bash-Startup-Files
UPDATE: Here's the short version:
When Bash is invoked as an interactive login shell, or as a non-interactive shell with the
--login option, it first reads and executes commands from the file
/etc/profile, if that file exists. After reading that file, it looks for
~/.profile, in that order, and reads and executes commands from the first one that exists and is readable.
When an interactive shell that is not a login shell is started, Bash reads and executes commands from
~/.bashrc, if that file exists.
When Bash is started non-interactively, to run a shell script, for example, it looks for the variable
BASH_ENV in the environment, expands its value if it appears there, and uses the expanded value as the name of a file to read and execute.