1) local net: Use the winsock library (some parts of it should've been named "winsuck", but in general its ok, and fairly straigtforward to use)
2) internet: If you're dealing with firewalls, HTTP is the only real way to go. It requires an HTTP server on the remote machine, and either ASP, PHP or a server plugin (all of which are easy to do, though it may sound very technical).
In the socket-case, the remote machine creates a socket, and listens for incomming connections. The client makes a connection (specifying e.g. the server IP address and port number). The rest is simple I/O..
In the HTTP case, I'd recommend Java for the Client if at all possible. Otherwise you'll need some kind of library supporting HTTP (possibly the IE Active X control from MS).
Hope I haven't send you off on a wild goose chase
/NJ