Hacking is the gaining of access(wanted or unwanted) to a computer and viewing, copying, or creating data(leaving a trace) without the intention of destroying data or
maliciously harming the computer.
This represents the Good Guys most of the time for they are the ones who search for these exploits to prevent crackers use a method called cracking(opposite of hacking).
Hacking and hackers are commonly mistaken to be
the bad guys most of the time. Crackers are the ones who screw things over as far as creating virus, cracks,
spyware, and destroying data.
References:
Cracker - Person who gains unauthorized access to a computer with the intention of causing damage.
Cracking - Method by which a person who gains unauthorized access to a computer with the intention of causing damage.
Hacker - Person who gains
authorized/unauthorized access to a computer WITHOUT the intention of causing damage.
Spyware - A Program that was created by a person(most frequently a cracker) to watch the computer and it's actions and report the details to the
origional maker.
Virus - A maliciously made program that is used to destroy data, or hurt the performance of the computer. Makes copies of itself and sends it to more people.