RabbitMQ is mainly used as a messaging middleware between applications. You can think of it as a message queue between various components of the system. With the advent of micro services architecture, where you have server applications deployed as a bunch of micro services running on different computing modules, its becomes necessary to have a queueing mechanism between then for inter process communication.
Traditionally this was done in house by creating a socket based API , but now RabbitMQ and Kafka based middlewares make the programming a lot more easier and the best part is that they scale very well with the application and requests.
Hope this helps.
-Shyam