In a way, roleplaying is similar to acting, but usually it's done without a script. It's the idea of acting out a role of a persona different than one's own in a scenario-based setting. While roleplaying has been used in work training scenarios and in marriage counseling offices, we're primarily concerned with the type of roleplaying which occurs in a game setting.
One of the first well-known roleplaying games (known as RPGs) was Dungeons & Dragons many decades ago and the genre has since branched out into a multitude of commercial and creative commons based titles.
MUDs (and thereby MUSHes came about online, which are multi-user gaming or social environments. These allow players to logon to one game and interact with each other as various characters in various fantastical worlds and scenarios... all in a text-based medium. This is where X-Men: Retribution comes in.