I hear people talk about ports and protocols (in relation to computer networking), and they often provide analogies for them (for example: "a port is much like a shipping port, it sends and receives data like a shipping port sends and receives goods from other ports") and things like that.
I understand what this all means, but only at a very artificial level. Basically, I know what a port and I understand what protocols are, but what are they really?
Are these ports physical objects? Are they something built into part of my computer? How many ports are there? Can I increase or decrease the number of ports? Are they even something physical? Or written in code? Where is this code? The operating system? What truly is a port?
What are protocols? I'd imagine they're some sort of code.... Can you create your own protocol? How do you get a specific port to run a specific protocol? What language do you use to create a protocol? How do you define or invent a new protocol?