How it works
An NPN bipolar junction transistor has three terminals: base, collector, and emitter. A small current flowing into the base allows a much larger current to flow from collector to emitter — the ratio between them is the transistor's current gain (hFE or β), typically 50-300 for small-signal parts.
This makes an NPN transistor useful as a current amplifier (driving a relay or motor from a microcontroller pin) or as a switch (fully on or fully off, controlled by the base).
CircuitForge models the base-emitter junction with the diode equation and applies the gain parameter to derive collector current — the same core approach as a real small-signal transistor datasheet's DC characteristics.