RAM model
The RAM model is the idealized computer we secretly imagine when we say an algorithm takes "n steps." Real machines are bewilderingly complicated — caches, pipelines, varying clock speeds — and if we counted nanoseconds on one particular laptop, our analysis would be useless on any other. So instead we agree on a simple, fictional but reasonable machine, count operations on it, and get a clean, machine-independent measure of cost. RAM stands for random-access machine: "random access" means you can reach any memory cell directly, in one step, the way you can flip straight to any page of a book by its number rather than turning pages one by one.
In this model, memory is an unbounded array of cells, each holding one word (a number that fits the machine, big enough to index the input). The basic operations — read or write a cell, add, subtract, multiply, compare, follow a branch — each cost one unit of time. So to measure an algorithm's running time we simply count how many such operations it performs as a function of the input size n. Walking once through a list of n items to find the maximum does about n comparisons plus a little bookkeeping, so we call it linear, about n steps. The model deliberately ignores the constant differences between a fast and a slow real machine, because those only scale everything by a fixed factor and do not change how the work grows with n.
The RAM model is a simplification, and it is worth knowing where it bends. Its "one word, unit cost" assumption is fair only while the numbers involved fit comfortably in a machine word; multiplying thousand-digit integers is not really one step, and a more careful bit-cost model charges for the digits. It also pretends every memory access costs the same, whereas real caches make nearby accesses far cheaper — which is why two algorithms with the same RAM step count can differ in real speed. Still, for the vast majority of analysis the RAM model is exactly the right altitude: detailed enough to be meaningful, abstract enough to be portable.
Summing an array of n numbers in the RAM model: one addition and one memory read per element, so about n unit-cost steps — linear time — regardless of which real computer eventually runs it.
Count unit-cost operations, not nanoseconds — that is the RAM model's gift.
The unit-cost assumption breaks for very large numbers: multiplying two huge integers is not really one step. When values can grow with the input, use a bit-cost model that charges by the number of bits.