A lever is a mechanical handle attached to the side of the machine. Traditionally, players would pull this lever to initiate a spin of the reels, hence the old nickname for slot machines: "one-armed bandits".
When pulled, the lever would trigger a mechanism inside the machine that spins the reels. The reels would then spin until they each stopped on a random symbol, forming a combination that could potentially result in a win.
While modern digital and online slot machines have mostly replaced the mechanical lever with a digital spin button, some physical slot machines retain the lever as a nod to nostalgia and tradition. In these machines, the lever generally serves the same function as the spin button, initiating a spin when pulled.