In bacteria, RNA transcripts are ready to act as messenger RNAs and get translated into proteins right away. In eukaryotes, things are a little more complex, though in an pretty interesting way. The molecule that's directly made by transcription in one of your (eukaryotic) cells is called a pre-mRNA, reflecting that it needs to go through a few more steps to become an actual messenger RNA (mRNA). These are:
Addition of a 5' cap to the beginning of the RNA
Addition of a poly-A tail (tail of A nucleotides) to the end of the RNA
Chopping out of introns, or "junk" sequences, and pasting together of the remaining, good sequences (exons)
Once it's completed these steps, the RNA is a mature mRNA. It can travel out of the nucleus and be used to make a protein.
Both ends of a pre-mRNA are modified by the addition of chemical groups. The group at the beginning (5' end) is called a cap, while the group at the end (3' end) is called a tail. Both the cap and the tail protect the transcript and help it get exported from the nucleus and translated on the ribosomes (protein-making "machines") found in the cytosol
The 5’ cap is added to the first nucleotide in the transcript during transcription. The cap is a modified guanine (G) nucleotide, and it protects the transcript from being broken down. It also helps the ribosome attach to the mRNA and start reading it to make a protein.
How is the poly-A tail added?
The 3' end of the RNA forms in kind of a bizarre way. When a sequence called a polyadenylation signal shows up in an RNA molecule during transcription, an enzyme chops the RNA in two at that site. Another enzyme adds about 100-200 adenine (A) nucleotides to the cut end, forming a poly-A tail. The tail makes the transcript more stable and helps it get exported from the nucleus to the cytosol.
The third big RNA processing event that happens in your cells is RNA splicing. In RNA splicing, specific parts of the pre-mRNA, called introns are recognized and removed by a protein-and-RNA complex called the spliceosome. Introns can be viewed as "junk" sequences that must be cut out so the "good parts version" of the RNA molecule can be assembled.
What are the "good parts"? The pieces of the RNA that are not chopped out are called exons. The exons are pasted together by the spliceosome to make the final, mature mRNA that is shipped out of the nucleus.
A key point here is that it's only the exons of a gene that encode a protein. Not only do the introns not carry information to build a protein, they actually have to be removed in order for the mRNA to encode a protein with the right sequence. If the spliceosome fails to remove an intron, an mRNA with extra "junk" in it will be made, and a wrong protein will get produced during translation.
Splicing needs to precise and consistent. This careful cutting and pasting is performed by the spliceosome, an enzyme complex made of protein and small RNAs. Most introns contain marker sequences at both of their ends, which are recognized by the small RNAs and direct the spliceosome to remove the intron. Once the intron has been cut out, the spliceosome will "glue" (ligate) the flanking exons together.