The mRNA in cells relays instructions from the DNA inside the cell nucleus to tiny organelles in the cytoplasm called ribosomes. Ribosomes read the instructions and produce the proteins the cell needs.
DNA is the mastermind of the cell, regulating all functions within it. It does so via instructions called codons. A mass of codons describing the same thing is called a gene. While DNA contains the main instructions for a cell, it remains within the central cell nucleus for protection. This raises the problem of how these instructions are going to reach the rest of the cell, and how the DNA is going to receive feedback. RNA solves this problem by being similar enough to DNA to read and copy off the codons, but different enough that it is safe for it to leave the nucleus.
RNA in general reads off and carries codons for a variety of purposes. Some RNA, called tRNA, will help the ribosome translate the codons into proteins. The "m" part of mRNA stands for "messenger." It serves as a courier between the cytoplasm and the nucleus. Messenger RNA has its own helper, in the form of a molecule called polymerase. This molecule transcribes the codons directly onto the RNA. The mRNA then leaves the nucleus, and ribosome subunits attach themselves to the mRNA to read it off like a ticker tape.