Well, as far as knowing when someone's trying to get in, the most conventional way to find that out is with a firewall. Zone Alarm's free version is great for getting info like that. It'll let you know every time someone runs a port scan on your computer and give you alerts for similar events. However, nowdays much of the hacking is actually not done by mass port scans looking for 0-days or common exploits, but by "drive-by" malware that is installed on your computer when you surf the web or check email. The best way to protect against that is via a good real-time security suite, such as avast, doing all your browsing through firefox instead of internet explorer, and using a web-based mail client instead of a client-based one such as outlook or thunderbird, etc.
As far as knowing how they get in goes, it's best to get the information from hackers themselves. Hang around these forums, the ones at www.criticalsecurity.net
, and similar ones and just observe. Listen in to the conversations, pick up on keywords and google them, ask intelligent questions, etc. Google is your best friend for that, once you find a starting point. I'll give you a few keywords to start you out:
port scan, vulnerabillity exploitation, backdoor/trojan/virus/etc, exploit, network sniffing, fingerprinting, ssh, rdp, brute forcing, password cracking, sam cracking, john the ripper, cain and able, thc hydra, etc. Send me a PM if you have questions.