Read this passage and open each verse for the full verse feed and commentary tools.
5then shall you bring forth that man or that woman, who has done this evil thing, to your gates, even the man or the woman; and you shall stone them to death with stones. 6At the mouth of two witnesses, or three witnesses, shall he who is to die be put to death; at the mouth of one witness he shall not be put to death. 7The hand of the witnesses shall be first on him to put him to death, and afterward the hand of all the people. So you shall put away the evil from the midst of you.
Deuteronomy 17:5-7 (WEB)