If you’re trying to connect to the host on the same machine the server is running on, you should connect via a local address. (localhost, 0.0.0.0, 127.0.0.1, etc)
If your friend is trying to connect from a different machine on the same network, he should be trying to connect via the ipv4/ipv6 address. (ipconfig)
If your friend is trying to connect to the host from a different machine on an outside network, he should be trying to connect via your physical address (whatsmyip) or a dynamic address (dyndns, no-ip, etc)
If you’re correct attempting the connection and still not connecting, check to see if you have any firewalls enabled blocking the port or application from allowing network connections.