What is "[l'Yad She'arim] l'Fi Kares"?
Rashi: It is a roof on the gate. People sit on it.
Malbim: Later, Chachmah stands by the gates where the Sanhedrin and judges sit. These are the laws of Chachmah handed over to Sanhedrin and great Chachamim who received the entire oral Torah. From them, rulings go out to all of Yisrael.
Why does it say "Teronah"?
Rashi: It screams and says what follows.
Malbim: Finally, Chachmah sings at openings where individuals are hidden in their rooms. These are secrets of Torah like Ma'ase Bereishis and Ma'ase Merkavah. They are not expounded in public, only to outstanding individuals. These four levels (refer to 8:2:1:1, 8:2:2:1, 8:3:1:2) correspond to Pardes (Peshat, Remez, Derash and Sod).