At each node the underlying can move up or down by an amount set by volatility and step size. Working backwards from the payoff at expiry gives the option's value today. Because you can compare the continuation value with the immediate exercise value at every node, the method handles American options that the closed-form equation cannot.
That is why brokers use lattice methods for equity options and reserve Black-Scholes for European contracts. With enough steps, the binomial result converges on the closed-form answer for a European option, which is a useful sanity check on any implementation.
Example: XYZ at $50, a $50 put with 45 days, 25% volatility and 5% rates. A European formula prices it at $2.02. A 500-step binomial tree, allowing early exercise, prices it at $2.06. That four-cent difference is the american-premium.
Related: black-scholes-model, monte-carlo-pricing, american-premium, early-exercise-boundary