What does the Ten Commandments have to do with the Law and the Two Greatest Commandments?

Through studying the ten commandments, it became obvious to me that these were never done away with. How could they be? How could we ever put another god on the face of YHVH and it be ok? How could we ever make idols and it be ok? How could we ever murder and it be ok?…