The encryption is a one-way street. One (simple, understandable and entirely useless for security) example of such an "encryption" function would be to simply count the letters typed.
If somebody's password is "foo", it would be stored as "3". Given "3", it's impossible to tell that the password was "foo".
When I want to log in, I type "foo", the login program converts what I typed into "3", and compares that value to what it has stored. Also "3". Access granted.
If I had typed "fluff", that would have been converted to "5", and access would have been denied.
Obviously, with this scheme, I could just as well have typed "pig", and that would have granted me access as well. But Unix doesn't simply count letters, and collisions like this are unlikely. The function used is also such that coming up with something yielding a given hash (the "3" in the above example) is really hard.