Writing them down when you make them usually works. I personally would write it down and tape it to the bottom of my PSU.... Whos gonna look there, amirite.
when you create one for yourself, make sure you write it down and store it in a safe but easy to reach place. create a password recovery disk while you're at it. a password recovery disk will help you in case you lose your password.
if it's a password for a networking device, check it's manual for default password. or ask your network administrator.
if you're asking how to know someone else's password, i cannot help you with that. it is against tomshardware terms to help with password protection bypassing.