Hacking a computer is something that you may have to do in the case that you've forgotten your password, and it is also important to understand how hacks work from a protection point of view. Importantly, you need to ensure that you are not breaking any laws by hacking into the computer. If you are breaking into a PC on your local network, then it is very likely that you own the PC, so breaking into it is fine. There are a variety of different hacks depending on what you want to achieve, do you want to reset a certain users password? Or would you like to access all the files on the computer? To reset a users password, go here and follow the instructions: www.wikihow.com/Hack-a-Computer
If you simply need to access files on a computer that is otherwise inaccessible, you can try using an ubuntu live CD. Provided you can select to "boot from a CD" at boot (which on most computers requires pressing F12 during the start-up sequence - check your motherboard manual for specific instructions for your PC), you can then run ubuntu where you will have full access to the file system and you can make other changes to the computer since you have administrative access. You can download and burn an ubuntu CD image to boot from here: www.ubuntu.com/desktop/get-ubuntu/download
Another trick is booting the computer in safe mode, and then you are presented with an administrator account to log into. From here you can change key settings and components of the computer. To boot in safe mode, you need to press F8 as the computer is starting up (repeatedly tap F8 until the safe mode dialogue comes up). This link details more information about using safe mode to change your password if you have forgotten it: www.wikihow.com/Log-on-to-Windows-XP-if-You-Forget-Your-Pass
Hacking a computer purely over the network which you do not have any access to (so you have no username and password to log into) requires using vulnerabilities in the operating system. However this practise is generally against the law, and unnecessary for any home user to understand. If you are concerned about protecting yourself from these attacks, remember to keep your PC up to date by using windows update. This will patch any vulnerabilities as they become known. You can run Berlarc Advisor on your PC to see if your computer is venerable to any known attacks, and it will tell you the hotfix number so you can download a fix from Microsoft to patch the vulnerability. Here is a link to Belarc: www.belarc.com/free_download.html
If you simply need to access files on a computer that is otherwise inaccessible, you can try using an ubuntu live CD. Provided you can select to "boot from a CD" at boot (which on most computers requires pressing F12 during the start-up sequence - check your motherboard manual for specific instructions for your PC), you can then run ubuntu where you will have full access to the file system and you can make other changes to the computer since you have administrative access. You can download and burn an ubuntu CD image to boot from here: www.ubuntu.com/desktop/get-ubuntu/download
Another trick is booting the computer in safe mode, and then you are presented with an administrator account to log into. From here you can change key settings and components of the computer. To boot in safe mode, you need to press F8 as the computer is starting up (repeatedly tap F8 until the safe mode dialogue comes up). This link details more information about using safe mode to change your password if you have forgotten it: www.wikihow.com/Log-on-to-Windows-XP-if-You-Forget-Your-Pass
Hacking a computer purely over the network which you do not have any access to (so you have no username and password to log into) requires using vulnerabilities in the operating system. However this practise is generally against the law, and unnecessary for any home user to understand. If you are concerned about protecting yourself from these attacks, remember to keep your PC up to date by using windows update. This will patch any vulnerabilities as they become known. You can run Berlarc Advisor on your PC to see if your computer is venerable to any known attacks, and it will tell you the hotfix number so you can download a fix from Microsoft to patch the vulnerability. Here is a link to Belarc: www.belarc.com/free_download.html