What I'm wondering is how running programs communicate with each other, and if someone could post some sample code for how to do this, so I can try it out myself, just for educational purposes.
For example, I've worked with databases before, and in my code I always have to "establish a connection to the database." The database service has to be running before I start my program, or else it will fail. What exactly is going on with that connection and how does it work?