~ is short for $HOME
$HOME is set by your shell to your home directory as it appears in /etc/passwd.
So, /etc/passwd contains /home/gerard, bash sets $HOME to /home/gerard and since ~ translates into $HOME, ~ == /home/gerard
So ~/.bash_profile is $HOME/.bash_profile or /home/gerard/.bash_profile
You also see those ~ used in URLs ala
http://linuxfromscratch.org/~gerard/
If ~ is followed by a username like ~gerard, it'll go lookup the username 'gerard' in /etc/passwd and extracts its home directory. So "ls ~gerard" will make ls look at /etc/passwd, find user 'gerard' find its home directory and lists its contents.
I hope this is clear enough?