"~" - represents the home folder of the user, conventionally it would be /home/user/, where "user" is the user name can be anything like /home/johnsmith.
"$" - is just a sign of the shell prompt, which means that the shell is ready to accept commands, you can understand it as a separator after which, you can interact with a shell. Can also be "#" which shows that root is the user whose session is going on.