The Ten Commandments are found in the Old Testament, Exodus 20:1-17. The Ten Commandments were given to Moses while he was on Mount Sinai, and they were intended to be rules that the Israelites should follow.
In the Bible story, Moses lead the Israelites out of Egypt, and then he went to the mountain for 40 days and 40 nights. God gave Moses two tablets containing the commandments. Moses later destroyed the tablets out of anger when he witnessed his followers committing sins. Both Jewish and Christian religions still use the Ten Commandments as the basis for how people should act.