The Gemara Niddah 30b writes that "they" teach the embryo the entire Torah in the womb. However,the gemara brings one passuk as a proof which says וירני ויאמר לי... which is a loshon of one person teaching, not many. So who teaches the embryo Torah ,a malach,many melachim,HaShem?
This is from Proverbs 4:4 but the Baraisa later says that Shlomo Hamelech could have meant that he was referring to the knowledge that he gained as a prophet rather than in the womb. However, the following note references the pasuk in Iyov to say that Hashem Himself teaches the fetus, citing Rashi. The gemaro continues that He assigns a malach to suppress the knowledge at birth so that it can be regained (with adult understanding) upon study of Torah (note 36).
Art Scroll Talmud Nidah page 30b4 note 33
In this verse, Solomon recounts how Hawshem Himself instructed him. The verse does not contain a clear indication that it speaks of instruction in the womb; however, the Baraisa does deem this interpretation plausible (Maharsha). [As we shall soon see, the Baraisa itself considers this interpretsation speculative, and therefore cites an additional verse to more fully prove its point].
Note 34 expands on this and says that Hashem Himself teaches the fetus in the womb.
Art Scroll Talmud Nidah page 30b4 note 34
Job 9:4 The verse appears in the passage in Job already demonstrated to describe life in the womb (xs. 2-4; see Gemara above). As such, these words are taken to imply that Hashem teaches the Torah to the unborn child (see Rashi). [The simple meaning of the verse refers to the company of Torah scholars with whom Job studied; see Rashi to Job loc. cit.]
According to the Maharal in Chidushei Hagaddos it means that the Neshama is not yet combined with the body and is therefore naturally aware of the Torah. The flick before coming out is the final touch which unites soul and body, thereby causing it to forget the Torah.