These are the most common ways how hackers hack facebook, gmail and other accounts 
on social networking sites :
1.Phishing – It is technique in which hacker creates a fake page (login page) of the site. As the user fills his user id and password in the fields the hacker gets them .
2.Keyloggers -Keyloggers are used to record the key strokes typed by the victim. A hacker installs a keylogger in the pc of the victim and gets all the logs of password via mail or physical access .
3.Social engineering – Social engineering is understood to mean the art of manipulating  people into performing actions or divulging confidential information. Here a hacker uses his ability to speak,converse,read minds of people to extract information from them. Kevin mitnick is one hacker who is known to be master in this technique.
Look forward to further articles for details about these techniques. :)