The mRNA leaves the nucleus through the nuclear pore and carries its information to the ribosomes in the cytoplasm.
The nucleus is surrounded by a double membrane. Each nucleus has many pores that allow macromolecules in or out in a carefully controlled manner. Each nuclear pore is surrounded by a cluster of proteins known as the nuclear pore complex that controls entry and exit.
The details of precisely which molecules are allowed in or out are still murky. We do know that once messenger RNA has received its cap and tail and had its introns spliced out, it is free to exit the nucleus. Binding of the spliceosome to the mRNA prevents it from leaving until splicing is finished.
The final exit of mRNA requires a variety of protein factors. Exportins and importins are protein factors known to control the exit and entry of specific classes of molecules through the nuclear pores. Transport out of the nucleus of large molecules like RNA require energy. This is obtained by the hydrolysis of guanosine triphosphate.