XMPP is an open standard for instant messaging and presence information. It has been implemented by services like Google Talk, Facebook, Yahoo, and others. XMPP uses XML streams to send small messages and is extensible and federated.
OTR provides encryption for instant messages to ensure forward secrecy, repudiable authentication, and prevent eavesdropping. The example message shows how OTR inserts encrypted fields into the XMPP message.
The "socialist millionaire" problem in cryptography refers to allowing two parties to determine if they have equal wealth without disclosing the actual amounts.