What directs macromolecules to their cellular locations
This is fairly often question for molecular biology


  how does the mRNA know exactly how to get to those organelles


The secret to understand it, is that nothing knows where to go. Different molecules have different affinity to each other. Molecule A likes molecule B, but not molecule Y. Inside the cell, thermal fluctuations causes disorder that drives molecule A to bump into all kinds of molecules, including Bs, Zs, Ys, and others. However, when stumble upon molecule B, molecule A will very likely form some sort of stable complex with it. One example, is ribosome and mRNA.

When mRNA and ribosome join into complex, their inner parts can be considered in the same fashion: they will jiggle a lot around, but most likely jiggle will produce polypeptide, not, let's say DNA, or not cause mRNA to fall away from the ribosome.

So, you can say that mRNA tries to go everywhere it can, without any clear direction, apart from the fact that it will most likely form something stable (i.e. useful) with ribosome. Or maybe it will be mRNA degradation protein, such as ribonuclease.

PS: "will very likely form some sort of stable complex" means that in some reasonable time mRNA will find and bind to ribosome. However, it might take billions of years for ribosome to bind DNA and produce some sort of polypeptide.