The runtime of a blockchain is the business logic that defines its behavior. In Substrate-based chains, the runtime is referred to as the "state transition function"; it is where Substrate developers define the storage items that are used to represent the blockchain's state as well as the functions that allow blockchain users to make changes to this state.
In order to provide its defining forkless runtime upgrade capabilities, Substrate uses runtimes that are built as WebAssembly (Wasm) bytecode. Substrate also defines the core primitives that the runtime must implement.
The core Substrate codebase ships with FRAME, Parity's system for Substrate runtime development that is used for chains like Kusama and Polkadot. FRAME defines additional runtime primitives and provides a framework that makes it easy to construct a runtime by composing modules, called "pallets". Each pallet encapsulates domain-specific logic that is expressed as a set of a storage items, events, errors and dispatchable functions. FRAME developers can create their own pallets and reuse existing pallets, including over 50 that ship with Substrate.
For the most part, this section is focused on Substrate runtime development with FRAME. Keep in mind that FRAME is not the only system for Substrate runtime development.