The function of RNA depends on the type of RNA. The three main types of RNA are mRNA, rRNA, and tRNA. In general, all three of the types of RNA are
Messenger RNA(mRNA) carries the genetic information of a portion of DNA needed to make a protein.
Transfer RNA(tRNA) is also important for protein formation, as it binds to mRNA and amino acids and is crucial for translation. Every amino acid has a corresponding type of tRNA that binds to it.
Ribosomal RNA(rRNA) is what ribosomes are made of. rRNA and sets of proteins together form ribosomes. Ribosomes have the role of catalyzing the assembly of amino acids into actual chains of proteins.
This video may be helpful:
To read more about the function of RNA in greater detail, see this Nature article on the topic and this one as well.