Every Bitcoin coin is locked by a program. It is tiny, deliberately simple, and runs billions of times a day without anyone noticing. The language in which it is written is called Script, designed by Satoshi along with everything else, and understanding it means understanding what exactly a transaction proves.
Script works by stacking. Imagine the paper spike on an old counter: you can only put a sheet on top and only take the sheet from the top. Each instruction either stacks a piece of data or takes some sheets from the top, performs a calculation with them, and stacks the result. In the end, if what remains on top is true, the spending is valid.

It's worth reading the most common lock in Bitcoin history, the P2PKH, line by line. It says: duplicate what's on top, calculate the hash160 of it, stack this hash that I saved, check that the two are equal and stop everything if they aren't, and finally verify the signature.
The person spending presents two things: the signature and the public key. Both are stacked first, and then the lock runs. Duplication exists because the public key will be used twice: once to become a hash and be compared with the address, and another to verify the signature. The hash comparison is the moment when the network confirms that the public key indeed belongs to the address. The signature verification is the moment when it confirms that the person presenting the key also has the corresponding private key.
Notice what just happened. The two questions from Module 4 — is this address from this key, and is this signature from this key — are not hidden rules in the nodes' program. They are written, in miniature, within the coin itself.
The modern format, P2WPKH, does the same thing with fewer words. The lock becomes just a version marker followed by the hash160, and the signature and public key travel in a separate area of the transaction, the witness. The node recognizes the pattern and applies the same verification without it needing to be written. Fewer bytes, same guarantee, lower fee.
Now the most important thing: what Script does not do. It has no loops. No instruction goes back, no program can run the same section twice. Every execution ends, and ends quickly, on any node in the world. This limitation is not a design laziness: it ensures that verifying a block takes a predictable amount of time and that no one can freeze the network by writing a lock that never ends.

It also sees nothing outside the transaction. It doesn't know today's date from a clock, doesn't check a price, doesn't store memory between transactions. Everything it decides, it decides with what is in front of it.
Within these limits, more is possible than it seems. Script requires multiple signatures, which is how the multisig from the previous trail exists. Script locks a coin until a date or until a number of blocks pass — the OP_CHECKLOCKTIMEVERIFY, added in 2015, is literally the time-locked vault of 19th-century banks, written in software. And Script locks a coin behind a secret, releasing it to whoever reveals the data that produces a certain hash, a mechanism that supports the entire Lightning network.

In August 2010, Satoshi disabled about fifteen instructions from the language at once, including those that joined or divided data, out of fear of behaviors that no one had managed to analyze properly. The decision is still criticized today by those who would like a more expressive language and defended by those who prefer a network small enough to be fully audited. The discussion remains open and is honest on both sides.
Having a valid lock is not enough to spend. The transaction still needs to reach the miners, compete for space with thousands of others, and be chosen. In the next lesson, the mempool and the auction that decides who gets into the next block.