Millions of LEGO bricks are made every hour. The LEGO factory in Billund, Denmark is highly automated, using robots and sophisticated molds to create the bricks, store them in color-coded bins, and even recycle any bricks or other bits that don't pass quality inspection. Here's how it works, in just two minutes:
If you want to linger with the process longer, here's a five-minute How It's Made segment on the factory. It's a few years out of date, but the process is still basically the same today—just with newer robots! Favorite quote: "This machine spits out 15,000 heads an hour." They're minifig heads, fortunately.
For those of you wondering whatever happened to "a big box of plain LEGO bricks," they still exist, and are surprisingly price-competitive with the finicky model sets. You're looking for a "Creative Bucket," which is itself shaped like a giant rounded LEGO brick. Now get building!