How does phishing work?

I often come across such a term as phishing and I know that it is something related to network security, but I don't quite understand it. Is there anyone who can explain to me what it is and how to protect yourself from hackers. Thank you.