Law was a system of rules to regulate behaviour.
The Master believed that law and order could only exist in times of peace. (TV: Frontier in Space)
The Seventh Doctor believed that one should follow native laws as what was right and wrong varied depending on the local norms. He, Roz Forrester and Chris Cwej criticised black letter law for not taking into account different circumstances or the severity of the impact on the public. (AUDIO: The Trial of a Time Machine)
Racial segregation was enforced by the law in certain US states in the 1950s (TV: Rosa) and in the United Kingdom in the 1960s. (TV: Remembrance of the Daleks)
In 1966, homosexuality was forbidden by British law. Oliver Harper faced arrest by the Metropolitan Police Service when his engagement in homosexual sex was discovered. (AUDIO: The Perpetual Bond)
British law had what Brian Rutherford called "charming eccentricities", such as his need for Patsy Haggard's approval to close down P.R.o.B.e. (HOMEVID: The Devil of Winterborne)
On Thrantas, any and all sentient beings could be prosecuted for their actions, including TARDISes. An act may or may not be illegal depending on its impact on the public. The Magistrum was in charge of all law and order on the planet until the Seventh Doctor, Roz Forrester and Chris Cwej released it. (AUDIO: The Trial of a Time Machine)
The Sixth Doctor did not hold Gallifreyan law in high regard. (TV: The Mysterious Planet, Mindwarp, Terror of the Vervoids, The Ultimate Foe)