Let us start at the beginning. In unix, if you want more than one process to access some information what do you do? You could open a file and read/write to and from it everytime, but this would be most inefficient, considering the disk IO that is involved - and imagine the file getting deleted while in use! So you would require some sort of repository in the memory, that can be accessed by any process that has need of it.
Now memory access means that you could just do a malloc and get a pointer that gives you access to memory that is as big as you have requested for (or have been given by the OS). But how does a process tell another process that is not its child what location the pointer is pointing at?
So the Creators hit upon a solution. Three different ways of interprocess communication were implemented - message queues, shared memory and semaphores.
Each can be used by unrelated processes (they use something called keys to return another value called the id - and one key can map only to one id - so multiple programs working together can use the same key to access the same queue/memory/semaphore).
Message queues are like FIFOs; messages sent to a message queue are all appended to the end, but retrieving a message from the queue can be done in different ways - the first message, the first message of a certain type or the first message different from the message of certain type. Check out
this page for more details on how to use message queues.
Shared memory is obvious, different processes access the shared memory by again mapping the key to an id, and directly read from or write to the memory - this is the fastest you can have processes talking to each other. Check
this page for more details on shared memory.
Semaphores are the gate keepers, they are used to determine if shared resoures (such as attached shared memory segments) can be read from or written to safely. Programs that are going to be using shared memory segments will also create or obtain existing semaphores. These mark whether a process is currently reading from or writing to a shared memory segment and consequently whether it is safe to carry out any operations on the shared memory now. Check
this page for info on semaphores.
Hope this helps!