The covenant that Joshua made with the people on this day was not a new one but a renewal of the Mosaic Covenant made for the first time at Mt. Sinai (v. 25). The Israelites renewed this covenant from time to time after God first gave it (cf. 8:30-35). The "statute"Joshua made was the written commitment of the people to obey the law (v. 26). The "ordinance"(right) was the record of the blessings Israel would enjoy as the fruits of her obedience.
The "book of the law of God"(v. 26) was the document in which Joshua wrote the record of this renewal of the covenant. He evidently placed it with the record of the covenant itself. The "large stone"(v. 26) he erected became a permanent memorial of the renewal of the covenant undertaken this day (cf. Gen. 28:18; Deut. 27:2). Joshua set the stone up under the oak that was the same tree as, or one that represented, the oak under which Abraham had built his altar and worshipped Yahweh. Jacob had buried his idols under an oak tree in Shechem, perhaps the same one (Gen. 12:7; 35:2-4). "The sanctuary"(v. 26) was this holy place, not the tabernacle that was then at Shiloh.
The stone had not literally heard all that had taken place that day (v. 27), but it would remain in the same place from then on as a silent witness to the proceedings. Joshua here rhetorically ascribed human characteristics to the stone (i.e., personification) to reinforce the seriousness of the commitment the Israelites had made to Yahweh. He then dismissed the nation (v. 28).
This ceremony was very important to the Israelites because in it the whole nation reaffirmed its commitment to Yahweh as her God and to His covenant as her law. Israel prepared to begin another phase of her national existence without a God-appointed leader such as Moses and Joshua had been. It was important that she remember the faithfulness of her God and rededicate herself to exclusive allegiance to Him. Each tribe was to proceed now to exterminate the Canaanites in its area trusting in Yahweh and obeying His covenant. God would raise up local leaders (judges) as He saw the need for these to provide special leadership in difficult situations. Committed as the Israelites were to their God at this time there was no reason they should fail to possess and experience all that God had promised them in the years ahead.