How wifi can be hacked?

Wifi can be hacked using a technique called DNS (Domain Name Server) hijacking, hackers can breach the security of your home Wi‑Fi and potentially cause you a great deal of harm. They can redirect your traffic to a website run by them, including your bank account details and Facebook log in.

I wonder how they can still detect even you are using a private wifi. Or the wifi is locked. Why there are a lot of hackers

That is how they work on for stalking maybe.