Hacking is generally of 2 types. For example:-

1. Ethical Hacking: Ethical Hacking is the medium used by White Hat Hackers to improve and protect the security of a system or network. Ethical hacking provides security by finding system errors and vulnerabilities.

2. Unethical Hacking: Here hackers gain unauthorized access and damage to various systems, networks, devices and applications. This type of hacking is considered a cyber crime.

There are generally 3 types of hackers. For example:-

1. White Hat Hacker: They test the security of computer systems and networks and find vulnerabilities. They provide information to correct these vulnerabilities. White Hat Hackers usually work for government agencies, businesses, and other organizations.

2. Black Hat Hacker: They hack to damage computer systems and networks. Attempts to extort money from various people/organizations by stealing their personal information through blackmail.

3. Grey Hat Hacker: They occupy an intermediate position between White Hat and Black Hat Hackers. Sometimes they hack for legal purpose and sometimes they hack for personal gain.