Genes are DNA sequences that code for a protein. It is an unusual feature of most genes that the sequence of nucleotides that code for a protein is regularly interrupted by non-coding stretches of DNA:
When genes are to be expressed by a cell they need to be copied and the non-coding parts edited out before they can be turned into protein. This process is called RNA splicing.
First the gene is copied in full to produce a primary transcript. This includes both introns and exons.
The primary transcript of mRNA is then processed to remove the introns and join the remaining exons together. A mature transcript of mRNA is formed.
The benefit of RNA splicing is that one gene can produce many different proteins as a result of what segments are treated as introns and exons. Different exons result in different mature transcripts and produce different proteins.