I recently tried learning networking and with it sockets. Upon attempting to make simple connections I came to realize that only through local networks can I ever get them to connect. I understand now that it's only with port forwarding that I can get these simple connections to work, however I am now confused as to how every other application I use seems to do this without an issue.
I don't understand how, if every socket connection I make requires port forwarding to get past the router/firewall, can any socket connection be established back and forth externally without that always being done? How can an external connection specify a device without the port forwarding? Can I implement this with sockets?
Lastly, am I going about learning network programming the wrong way by tackling sockets only right now?