In addition to what @razethestray said, applications can also talk to each other by means of so-called RPC interfaces, which stands for Remote Procedure Calls.
However, RPC itself is a broad term. Actually there are plenty of ways how an RPC could be implemented. For example, Microsoft's DCOM relies heavily on RPC. On the other hand, a SOAP (web) server call is considered an RPC as well. the one thing that they all have in common is, that a client calls a piece of code in a remote (server) process through a well-defined API to achive something.
As you can imagine, it is a good idea and highly recommended to use existing frameworks for such a task, simply to hide and manage the complexity that comes with the infrastructure needed for this. Those frameworks and in some cases built-in IDE support (e.g. for SOAP) make an RPC essentially look like a normal function/method call. In fact, behind the scenes there may be happen a lot, especially when the other process is on a remote machine.
PS: That's a quite sophisticated topic for starters.