Bitcoin Script is a list of instructions read left to right. Each instruction is an opcode: a single byte that tells the interpreter what to do. Data pushes put bytes (like a signature or public key) onto a stack; other opcodes take items off the stack, work on them and push a result.
Examples
OP_DUPcopies the top stack item.OP_HASH160replaces the top item with its SHA-256 then RIPEMD-160 hash.OP_EQUALVERIFYfails the script unless the top two items are equal.OP_CHECKSIGchecks a digital signature against a public key.OP_RETURNmarks an output as provably unspendable, often used to embed small pieces of data.
Disabled and reserved opcodes
In 2010 several opcodes, such as OP_CAT and OP_MUL, were disabled to avoid denial-of-service bugs. Unused "NOP" opcodes were later redefined by soft fork: OP_NOP2 became OP_CHECKLOCKTIMEVERIFY and OP_NOP3 became OP_CHECKSEQUENCEVERIFY. In Tapscript, unused opcodes are called OP_SUCCESS and make future upgrades simpler.