The laws of Judaism were presented by God to Moses in two strongly connected sets of 'documents':
1. The written law as it appears in the Torah - the Five Books of Moses. The Five Books of Moses were dictated to Moses who wrote them down.
2. The Oral Laws - God taught Moses the interpretation of the Five Books of Moses. Moses had passed it on to Joshua who had passed it on to the Elders. The Oral Laws were passed on orally from father to son, from a Rabbi to student for many years. About 2000 years ago the Oral Laws were collected, validated and put together in a written form.