You can think of the Bitcoin block chain as the state of a globally-accessible machine. The state is updated through the publication of valid blocks, each of which builds on a previous block. A block is composed of transactions, each of which incrementally advances the machine's state. Each transaction contains a small program "script" that defines the conditions for the state transition it causes.
There's this persistent misconception out there that only Ethereum works this way. It's a testament to marketing. Bitcoin has been doing "smart contracts" long before Ethereum was even a gleam in Vitalik's eye.