Can anybody explain this, please?
From the definition of Blockchain it is a distributed ledger. So smart contracts are also a part of the distributed ledger (in Ethereum context) and hence stored in every node of the network. Every time you change the state of the contract (if a state variable changed via a contract's function call), such instructions get executed in every node and new state stored in every node.
On Ethereum, whenever a smart contract is executed, the network comprising thousands of mining computers will process it.
Smart contracts written in a specific programming language, like Solidity, are compiled into 'bytecode' that will be executed by the 'Ethereum Virtual Machine' or EVM. This EVM can read and execute the smart contracts.
All nodes execute contracts using their own EVMs.
The EVM will execute a smart contract with whatever rules that you or the developers have programmed. The computation on the EVM is achieved through a stack-based 'bytecode' language.