In the course of translation it binds to the ribosome and the growing polypeptide chain, thus also preventing the folding of parts of the protein already further away from the ribosome.
The ribosome and Trigger Factor act in concert to confine premature folding of the nascent polypeptide.