Referring to trial by ordeal in the middle ages:
After the ordeals of hot iron and boiling water, the wound was bound for three days and then examined. If it was healing well, you were (supposed to be) judged innocent. There is one interesting catch that is not mentioned above; the more serious the crime, the greater the ordeal. For minor offences, you might have to carry a red-hot lump of iron weighing one pound, but for a more serious offence the weight (and size) of the iron went up to as much as three pounds. (You would probably have to carry it, in either case, for about three yards). With hot water, your arm might be dipped in only to the wrist, or all the way to the elbow.
In the ordeal by cold water, the person was bound hand and foot, and thrown into the water. There would be a rope tied to their waist, with two functions. First, there would be a knot tied in this rope at a specific distance from the accused's body; if the accused sunk far enough to wet the knot, they were innocent, but if the knot stayed dry, they were guilty. The other function of the rope was to pull the accused out. You'll notice that they'll be wanting to pull you out whether or not you're guilty -- if you float, they'll be wanting to kill you, and if you sink, they'll want to save you. The whole thing seems to be set up backwards, doesn't it? The reasoning was thus: the priest running the trial said a liturgy over the water, linking it to the baptismal water; if the person was innocent, the baptismal waters would welcome him, if not, they would reject him. (I don't know what they did if the person had never been baptised).
Liveforever adds that a trial by ordeal could also be used to prove a claim, as when Harald Bluetooth challenged a missionary named Poppo to a trial by ordeal after he said that there was only one God (the Christian one), and that the Aesir were actually just demons. Poppo held a piece of hot iron in his hand without being burned, and thus Bluetooth and his followers turned to Christianity.
As a matter of speculation, the Leidenfrost effect may be a factor in the trail by iron (see Dipping your hand into molten lead); this might allow some one to come through a trail undamaged, if the iron was the right temperature and their hand was damp.