A Smart Contract is originally a computer code that is built on top of blockchain. The smart contract is made up of a set of rules with the If-This-Then-That structure. Here when the involved parties meet the rules set, the smart contract is implicitly enforced without any manual intervention.
According to Wikipedia, Ethereum is an open source, public, blockchain-based distributed computing platform and operating system featuring smart contract functionality. The smart contracts, when once deployed onto the Ethereum platform, are immutable. The security of these contracts thus holds utmost importance.