It depends on whether you and the other port are setting up for incoming or outgoing connections.
"Connect to" typically means that you're setting up an outgoing connection to the destination port. In that case, if the port is local and the program using the port is using it to listen for incoming connections, you've just made a connection to that program. Whether you can make sense of any data it might send or not is your problem.
If the other program is also using its port for an outgoing connection, your connection attempt will fail and you will typically get an "address/port already in use" error message.
If you are setting up a port for listening for incoming connections, and the port is already in use, your attempt will also fail with an "address/port already in use" error.