Every service running on a server (web server, database, SSH) listens on a network "port." Port scanning checks which ports are open and reachable.
How does Nmap work?
Nmap sends network packets across a port range and analyzes the responses to determine whether each port is open, closed, or filtered — and in advanced mode, can even guess the software version behind it.
Why does every open port matter?
An unnecessary open port (say, a database on a public port) is exactly the entry point an attacker looks for. The rule: if it doesn't need to be reachable from outside, it shouldn't be.
What to do
Run a periodic Nmap scan against your own server and confirm only the ports you actually need (80, 443, 22) are open; everything else should be blocked by the firewall.
Every open port is a potential attack surface.