You probably want to read https://www.blockcerts.org/guide/
The OP_RETURN code was introduced by the Bitcoin core developers to address (but not necessarily endorse) the increasing desire of people to store non-financial data. The code signifies that an output is provably unspendable, allowing transactions to be pruned from the UTXO database.