Smart contracts are self-executing contracts with the terms of the agreement directly written into code. They automatically perform transactions and other actions when predefined conditions are met, without human intervention.