First, we have to go back to IRC, or Internet Relay Chat, one of the first real-time messaging platforms for computers. Daniel Stenberg put together a great history of IRC if you're interested in the backstory, but the key thing is that it was for real-time texting, something we take for granted today.
Designed and maintained by command-line geeks, IRC eventually became home for a variety of text commands now known as IRC Commands. Things like /join (to join a new channel), /nick (to change your handle), and /msg (to start a new private chat). Utilitarian commands, all.
Then there's /me, something far more whimsical than practical. By typing /me [some action], whatever you typed is displayed differently. For instance:
/me is juggling many things at once.
gets displayed as:
Bryan Chaffin is juggling many things at once.
In IRC, online games, and a variety of third party messaging platforms, it might be colored text, bolded, or formatted differently. In Game of War, for instance, /me commands get formatted in blue and italics. It's a real hoot.
It turns out OS X Messages supports this, too, and it has since iChat 4.0 in OS X 10.5 Leopard. Which is kind of weird because A.) 2007 seems late to the /me game, and B.) it's not in Messages for iOS, where it is far more likely to be used. You'd think this is one of those unused features that would have been axed in Apple's drive to tighten up OS X.
Be that as it may, this is what it looks like on your Mac:
Some /me commands in Messages for Mac in OS X 10.11.2 El Capitan
Is that useful? Who am I to judge? Wait, I know the answer to that. I'm Bryan, and judging is one of the things I do. It's not useful at all, but it can be fun! And I bet now that you know about it, you'll be compelled to try it.
Just realize that even though you're seeing it as a command on your Mac, if your recipient is viewing it on an iOS device, they'll just see it as straight text. Let me show you to give a better idea of how it works:
That same conversation as viewed on an iPhone in iOS 9.2