To find out whether a particular port on a internet server is open, we need to use nmap.
For example, if we wanted to check whether port 25565 (Minecraft) is open on the server
example.com, we would use this command:
nmap -Pn -p 25565 example.com
If you want to know more about nmap and its capabilities, check out the manual: