Early lotteries were done by drawing numbers, or winning tickets, from a container. In the UK, numbers of winning Premium Bonds (which were not strictly a lottery, but very similar in approach) were generated by an electronic machine called ERNIE.
Common lottery machines consist of balls with numbers printed on them, which are then mixed in the central chamber, and then drawn one at a time. Such machines are transparent so the balls are visible throughout the entire process instead of disappearing inside chambers or tubes.
Because of the massive payoff for a successful cheat (especially after the 1980 Pennsylvania Lottery scandal where drawing balls were rigged to draw a certain number of results), lottery machines are subject to strict security measures. In some cases there are several machines and several sets of balls, and the combination to be used is selected at random just before the draw.