Does the Bible explain exactly how the Urim and Thummim worked?
The Bible does not explain exactly how the Urim and Thummim worked. Scripture doesn't define them. They were evidently two gemstones placed in a pouch behind the ephod. The priest used them to get a yes or no decision from God, perhaps casting them like dice, but the exact mechanism is not described.
Les explains that the Urim and Thummim were evidently two little gemstones placed in a pouch behind the ephod. He notes that Scripture does not define exactly how they worked. When a yes or no decision was needed, the priest would pull them out and perhaps throw them on a table like dice, and however they landed was God's answer. He connects this to the choosing of Matthias, suggesting a similar device was used to get God's decision between the two men rather than a vote. The lot fell on Matthias, and he was numbered with the eleven as God's choice.