Say you make three commits, each one labeled "First commit", "Second commit", and "Third commit" respectively. Now, you want to squash the third commit into the second commit. You'll want to get the hash for the commit behind the commit we want to squash things into, so the commit that we're squashing things into shows up in the staging area.
So, type git log
and hit enter and you'll be presented with the following screen:
You'll want to use the Git hash that belongs to the commit labeled "First commit", since it's the commit behind the one you want to squash commits into.