You open a port when you run a service/daemon. For example, when you start http server (apache, nginx), by default it automatically opens port 80 and/or 443. You can not forcibly open a port without a service listening on it.
Allowing/restricting access to those ports via firewall is another story.