Kanbans are used in Lean Production. A kanban system is a 'pull' system of production as opposed to the traditional 'push' system. Products are made in small batches to meet the immediate demand. Each batch will usually only be sufficient for a few hours of consumption,
The Kanban is a card (or occasionally some other device) that authorizes production. When a batch is made the kanban travels with the batch to the next production stage. When that production stage starts to use the batch the kanban is returned to the producing station, thus authorizing the next batch.
If a producing station does not have any kanbans it does not produce anything. Thus if demand slows down, or stops, the production rate will slow down or stop. The producing station will not continue to produce to 'get ahead'. The kanban system reduces inventory and forces stations to be more efficient, responsive and achieve faster changeovers.
The use of small batches achieves a more regular flow of work and thus actually reduces the amount of stockouts.
The system described is a simple 'single card' systems. There are more complicated variations on this.