The Justinian Code is one of three sets of compilations concerning Roman law (the others were the Institutes and the Digest) that were compiled by late Roman jurists under the direction of the Emperor Justinian I starting in 528 AD. They remain important for their influence on legal history, including the law codes of many western nations.
Before Justinian's time, Roman law came from multiple sources. First were the Twelve Tablets, of ca. 450 BC. Next were various laws promulgated as part of legislative constitutions and praetorian and provincial edicts. The opinions on cases by famous jurisconsults were often cited in legal cases. Rescripts, or legal opinions given by the emperor in response to certain types of petition also had (according to Ulpian) the force of law.
Justinian's compilations were an effort to collect, organize, harmonize, and synthesize these diverse sources of legal judgment into a coherent whole.