"Early the next morning Joshua had Israel come forward by tribes, and Judah was chosen. The clans of Judah came forward, and the Zerahites were chosen. He had the clan of the Zerahites come forward by families, and Zimri was chosen. Joshua had his family come forward man by man, and Achan son of Karmi, the son of Zimri, the son of Zerah, of the tribe of Judah, was chosen." NIV translation
We do not know how God's selections were revealed but the family of Achan was found to be the guilty party. This is a reminder to us that you cannot hide your sin from God. It will either be taken care of by the blood of Jesus or by our own blood.
"Then Joshua said to Achan, 'My son, give glory to the Lord, the God of Israel, and honor him. Tell me what you have done; do not hide it from me.' Achan replied, 'It is true! I have sinned against the Lord, the God of Israel. This is what I have done: When I saw in the plunder a beautiful robe from Babylonia, two hundred shekels of silver and a bar of gold weighing fifty shekels, I coveted them and took them. They are hidden in the ground inside my tent, with the silver underneath.'" NIV translation
Achan confessed what he had done and we see the steps in following the flesh. He had saw something and wanted it more than he wanted to listen to the Lord. He took it and tried to hide it hoping that God would not be looking.
"So Joshua sent messengers, and they ran to the tent, and there it was, hidden in his tent, with the silver underneath. They took the things from the tent, brought them to Joshua and all the Israelites and spread them out before the Lord. Then Joshua, together with all Israel, took Achan son of Zerah, the silver, the robe, the gold bar, his sons and daughters, his cattle, donkeys and sheep, his tent and all that he had, to the Valley of Achor. Joshua said, 'Why have you brought this trouble on us? The Lord will bring trouble on you today.' Then all Israel stoned him, and after they had stoned the rest, they burned them. Over Achan they heaped up a large pile of rocks, which remains to this day. Then the Lord turned from his fierce anger. Therefore that place has been called the Valley of Achor ever since." NIV translation
All of Israel was used as God's instrument of judgment. As the head of his family, Achan had involved the rest in his sin and so they were all punished.