If the judge decides a person must be beaten with a whip, the judge must make that person lie face down. Someone will beat the guilty person while the judge watches. The number of times he must be hit depends on the crime.
"If two brothers live together, and one of them dies without a son, the wife of the dead man must not marry a stranger outside the family. Her husband's brother must take her as his wife and have sexual relations with her. He must do the duty of a husband's brother for her.
If the man does not want to take his brother's wife, she must go to the town meeting place and tell the leaders, 'My husband's brother refuses to keep his brother's name alive in Israel. He will not do the duty of a husband's brother to me.'
then his brother's wife must come to him in front of the leaders. She must take his shoe off his foot and spit in his face. She must say, 'This is being done to the man who will not give his brother a son!'
The Amalekites did not respect God. They attacked you when you were weak and tired. They killed all your people who were slow and walking behind everyone else.
That is why you must destroy the memory of the Amalekites from the world. You will do this when you enter the land that the Lord your God is giving you. There he will give you rest from all the enemies around you. But do not forget to destroy the Amalekites!