A smart contract is a piece of software running on blockchain. It is a persistent script which will always produce the expected output for the given input. The difference from a traditional piece of software running on a computer or internet server is that it can’t be controlled by that computer or server, or its owner. It is also running on all blockchain computers at once, making it highly resilient.
Smart Contracts can be used for anything from making simple payments to executing complex economical processes and have the potential to effectively replace their centralized counterparts, the traditional pieces of software.