For example, zina (adultery) needs four eyewitnesses to the act itself, or a voluntary and repeated confession, and the Quran prescribes a penalty for those who accuse without four witnesses. Theft requires that the stolen goods are above a certain value, taken from a safe place, with no hunger or necessity. It is reported that during the famine in the time of 'Umar, he suspended the punishment for theft. The Prophet ﷺ turned away a man, Ma'iz, who confessed to adultery and asked him whether he was sure.
In reality, the hudud have been applied very rarely in history, and in the modern world most Muslim-majority countries do not apply them. Some scholars say they should be applied only in a society that provides justice and welfare first. The stoning punishment for adultery is based on the Sunnah and not on the text of the Quran, and scholars have disagreed about it. Critics see these penalties as harsh, and Muslims say their purpose is deterrence, with the strict conditions making conviction almost impossible.