Definition
One side holds bids, offers to buy, the other asks, offers to sell. The highest bid and the lowest ask are the best prices available, the distance between them is the spread, and the size resting at each price is the depth. HyperCore's state includes an order book for each asset: the documentation says it works essentially the same way as all centralized exchanges but is fully onchain, with prices an integer multiple of the tick size, sizes an integer multiple of the lot size, and orders matched in price-time priority, so the earlier order at a given price is filled first.
Two details are particular to a book that is also a blockchain state. Margin checks happen on the opening of a new order and again for the resting side at the matching of each order, which keeps the margining system consistent after the oracle price has moved under a resting order. And the chain knows what an order is: within each consensus batch of a block (usually one or two), actions are sorted into those that send no GTC or IOC order to any book, then cancels, then those that send at least one, each group keeping the order the block proposer gave it. Prices carry at most 5 significant figures, and at most MAX_DECIMALS - szDecimals decimals, with MAX_DECIMALS 6 on perpetuals and 8 on spot.
The book is what decides several figures people take for fixed. It sets the slippage a market order pays, it decides whether an order is a maker or a taker, and it feeds funding: the premium component reads the impact prices, the average execution prices at which the funding impact notional would trade on each side (20,000 USDC for BTC and ETH, 6,000 USDC for other assets). A market can carry a large open interest and still hold a thin book, which is exactly when a liquidation moves the price.
Example
An example, in round figures. A book shows 3 BTC bid at $99,990 and 2 BTC offered at $100,010. The spread is $20, which is 2 basis points of the $100,000 mid. A market buy of 1 BTC takes the ask and pays a taker's fee; an order to buy 1 BTC at $99,990 joins the bid, waits behind the orders already there at that price, and pays a maker's fee if a seller ever comes to it.