Smart Contract is a software program, which is running on the blockchain and which is storing his state on the blockchain.
Traditionally the software programs are running in closed environments and they can be accessed via a User Interface or an API. However, smart contracts are running in an open environment – in blockchain, and are visible for everyone. Everyone can see the internal transactions of these programs. The ones, who have access rights, can even call methods of these programs. The internal transactions of the Smart Contracts are immutable.
We can visualize Smart Contract based blockchains as ledgers, where every row contains a software code. Every row can have multiple immutable internal transactions, which are visible to everyone.
Initial blockchains (for example Bitcoin) did not have the Smart Contract functionality, but this functionality was added with the Ethereum blockchain.