People attempt to hack into your accounts in different ways, some will try by sending you an email pretending to be from a trusted source (bank/ebay/whatever) and hoping you'll click on the link within the email, which will take you to a fake site, made up to look like real thing. They will often say they need to verify your details or some such nonsense.
This is easy to get around - Never follow a link from an email unless you are absolutely certain its bona fide.
Sometimes people will attempt to hack in to your account by basically throwing a huge pre-prepared password list at it. This is why its a good idea to follow advice about secure passwords, which are less likely, but still not 100%, to fall victim to this type of attack.
Another type is malware, particularly keyloggers. This may be hidden in a legitimate download your are making or from an infected site. It will sit on your machine and record all your keystrokes and transmit them to Mr/Mrs Naughtys computer.
Best way to avoid this is by installing good internet security software and scheduling regular scans.
Its impossible to be 100% secure on-line, but I hope this helps!