Message brokers
Message brokers allow communication between software components using messages in a manner resembling email or traditional mail. The sending and receiving programs, the clients communicates using the services of a message broker analogous to a post office or e-mail system. Message brokers can form a network and store and forward messages in the same manner as the traditional mail systems deliver mail.
In the simplest form of message exchange a sender sends a message to a queue associated with the recipient. The message broker maintains the queue and the recipient can retrieve the message at its convenience. Often the broker holds messages for the recipient even when the recipient is not connected to the broker.
The sender does not have to worry about message delivery, it justs sends the message to the broker and goes on with other tasks (this is commonly known as "fire and forget"-style messaging).
Another common paradigm is publish/subscribe messaging which works in a similar way to mailing list or forum. Recipients subscribe to topics they are interested in and senders send a message to the queue associated with the topic. The broker the forwads the messages to the subscribers
Message brokers differ from e-mail systems in that the former are optimized for delivery of messages between pieces of software, not humans.
The following picture shows a simple messaging system

Origin
Message oriented middleware has its origins in the mainframe world. Among the earliest knowm implementations was TCAM introduced in 1971. IBM's MQSeries, a well-known proprietary message -oriented-middleware (nowadays known as Websphere MQ) was introduced in 1992. Early users included the banking and financial industry where it still is used extensively.
Standards and related
The Java environment has standardized a standard called JMS (Java Message Service) that defines the external behaviour of a message broker (JMS calls a message broker a provider). JMS can be implemented as a standalone service or as an interface to non-JMS compliant middleware. JMS does NOT specify a wire protocol.
the AMQP consortium including banks J.P.Morgan, Chase and Credit Suisse has defined a specification including message broker semantics and a wire protocol that is not tied to Java or any other similar environment. The specifcation does not specify an API.
Features
Multivendor interfaces
Message-oriented middleware is typically used in a heterogenous multivendor environment, so a broker typically contains interfaces to a large number of different clients and and often also gateways to other brands of message broker. It also usually contains support for message forwarding over a number of different transports (i.e HTTP: and Java JMS).
Reliable delivery
The broker can provide services to assure that a message is delivered exactly once, persistence services (including interfaces to databases) to insure messages are delivered even in case of various failures and transaction handling. Message brokers can also be clustered to provide backup services in case of say hardware failure.