a finite-difference stencil
A derivative is a limit of slopes — the instantaneous rate of change as the spacing shrinks to zero. On a grid you cannot take that limit, so you do the next best thing: you estimate the derivative from a small handful of nearby grid values, with fixed weights. A finite-difference stencil is exactly that recipe: which neighbouring points to use and what number to multiply each by. It is the local 'cookie cutter' you stamp down at every node to turn a derivative into arithmetic.
The simplest examples come straight from Taylor series. The central difference for a first derivative is (u_{j+1} - u_{j-1}) / (2h), a three-point stencil with weights (-1, 0, +1) / (2h); its error is O(h^2). The second derivative uses the symmetric three-point stencil (u_{j-1} - 2 u_j + u_{j+1}) / h^2, with weights (1, -2, 1) / h^2, also O(h^2) accurate. Forward and backward differences (u_{j+1} - u_j) / h and (u_j - u_{j-1}) / h are lopsided two-point stencils, only O(h) accurate but useful at boundaries or for marching in time. People often draw a stencil as a little diagram — a cross or a plus of dots — that shows at a glance which neighbours feed into one update.
Stencils are the atoms of finite-difference methods: you assemble a PDE's discretization by replacing each partial derivative with its stencil and adding them up. The width of a stencil trades accuracy against complexity and boundary trouble — a wider stencil can reach higher order (a five-point first-derivative stencil hits O(h^4)) but needs more neighbours, which is awkward near the edge of the grid where some neighbours do not exist. Every stencil also has a leading truncation-error term you can read off from Taylor's theorem, and that term is what decides the scheme's order of accuracy.
On data 0, 1, 4, 9, 16 (which is x^2 at h = 1, points 0..4), the central difference at j = 2 gives (9 - 1) / 2 = 4, exactly the true derivative 2x = 4 there. The second-derivative stencil gives 1 - 2*4 + 9 = 2, exactly the true f'' = 2. Polynomials of low degree are differentiated EXACTLY by these stencils.
A three-point stencil turns a derivative into a weighted sum of neighbours.
A stencil's order of accuracy is a promise about the LEADING error term as h shrinks; it is not a promise about a fixed h. And smaller h does not help forever — for first-derivative stencils, dividing tiny differences by tiny h eventually amplifies round-off, so there is an optimal step size beyond which the answer gets worse.