It's pretty easy. All major accounts are linked to an email account. If you have to reset the password for Facebook, Twitter, etc, you ask them to send you a new password in your email. Well, with the email address, you have to usually just answer a security question. For example, you might have to know who the person's favorite teacher was, what's their favorite color, etc. If you know their email address and a little bit about the person, you can get into their email, request Facebook to change the password and then use that to go onto their Facebook.
Go onto their email site and try to login through their name. Ask to change the password. Find out what the security question is and then find out the answer to it. Then ask Facebook to change that person's password. The person will get an email. Check their email, you've got the password, go on their profile.
It's illegal, though.