From what I understand, in a CRISPR cas9 complex, gRNA is comprised of tracrRNA and crRNA. I've read that crRNA is the part which is matched to the DNA which is targeted, but what role does tracrRNA play in the process? That I'm not clear about. Also, unless this should be its own question; how is gRNA prepared with cas9 protein? Does the protein automatically bind to certain RNA strands?
Your two questions are related and you are correct in your supposition that the Cas9 protein associates to a specific RNA sequence. That of the tracrRNA processed with the crRNA into a gRNA. This is achieved without any other aid so could be considered to do so automatically. How specific the tracrRNA sequence needs to be is an interesting and often overlooked question.
When comparing tracrRNA from different species it is clear that there is not a lot of sequence conservation but they are predicted to be contain similar secondary structures.
Matching tracrRNA and Cas9 from closely related species does result in in vitro DNA cleavage but this does not work with more distantly related species. Nevertheless they are remarkably versatile and this has been exploited in a number of exciting genome engineering applications where additional structures are added without compromising the binding of the RNA to the Cas9.
The tracrRNA and the crRNA together form the gRNA which targets the Cas9 protein to the location of cleavage. In the endogenous bacterial systems the gRNA takes the form of a processed RNA duplex but in the genome editing implementations this takes the form of a single chimeric RNA with the two components already fused together.
When it comes to actual cleavage of DNA it is important that the Cas9 is in the correct conformation and changes in this are known to occur when binding to the target DNA. Recent work suggests the tracrRNA plays a role in maintaining the Cas9 protein in an active form allowing it to be able to target DNA.
It likely also contributes to the overall stability (and thus efficiency) of the CRISPR-Cas9 complex.
Ultimately the tracrRNA is an essential component of the CRISPR-Cas9 system via it's role in both guiding the Cas9 protein to its target and aiding it's function.
The following references might be of interest to you:
In short, tracrRNA keeps the CRISPR-Cas9 complex (of RNA and the Cas9 protein) catalytically active:
Image source: Figure 5 from Lim, Y. et al., 2016. Structural roles of guide RNAs in the nuclease activity of Cas9 endonuclease. Nature Communications, 7, p.13350. Available at: http://dx.doi.org/10.1038/ncomms13350.
This was shown by pre-incubating different sets of components together for 20 minutes, then adding the missing component(s) and observing the resulting amount of DNA cleavage activity. For example, in the "pink" experiment, only the Cas9 protein and tracrRNA are pre-incubated together and the crRNA is added just before the 5 minute cleavage time:
Image source: Figure 1 from Lim, Y. et al., 2016. Structural roles of guide RNAs in the nuclease activity of Cas9 endonuclease. Nature Communications, 7, p.13350. Available at: http://dx.doi.org/10.1038/ncomms13350.
The green bar represents the Cas9 protein pre-incubated for 20 minutes with both the tracrRNA and crRNA. The pink bar shows that pre-incubating with tracrRNA but without crRNA still results in the same level of activity (measured as fraction of cleaved product). However, when the tracrRNA is not included in the pre-incubation, as in the yellow and blue experiments, the activity is much reduced.