Chances are that a website service (not necessarily Facebook) that you were using was hacked. Lots of other websites use your Facebook account as a login option, btw. The hacker would then have your email and password. It is unlikely that your individual computer was hacked. Regardless, make sure to change your password.