Actually, these variables were inherited by bash from the Bourne shell.
"$$" means the current PID.
"$!" this is the PID of the last program that your shell ran in the background (for example, "myprog &")
Here is a list of shell variables:
source share