It depends on which OS you are talking about...

linux stores in more than one place... but the passwd file is the OS /etc/passwd
those are encrypted but they are still vulnerable
you can shadow it and it will be harder to access/crack w/o root access /etc/shadow

http://www.tldp.org/LDP/lame/LAME/li...e-formats.html

for windows learn about the SAM file (Security Account Management)

http://www.labmice.net/Security/passwordsec.htm

there is tons more out there.. so if you have any specific questions... search around and then ask what you don't understand