Just like human beings, machines need to communicate with each other – and they do this by passing messages around. The simplest form is to use a protocol like TCP and build some sort of API on top of it. But sometimes this just isn’t enough, especially if you want the connection to be reliable and you can’t afford to loose a single message.
Many people tend to implement it with the use of a database. They just save all messages to a table and let the other system fetch those messages and process them. But there are many pitfalls in such implementations and that’s why it’s considered an anti-pattern to use a database for these tasks. Better use a message queue system, these are particularly built for these types of tasks!