Ethical hacking involves legally accessing computer systems and networks to test security and find vulnerabilities. It helps identify weaknesses that criminals could exploit. There are different types of hackers defined by their intentions and knowledge - white hat hackers help companies, while black hat hackers intend harm. Ethical hacking is important as it allows issues to be addressed before real attackers can cause damage. Common attacks include brute force, buffer overflows, and denial of service. Companies should implement security measures like strong passwords, antivirus software, and logging out of accounts to protect themselves from hacking.