BMX is best known for being an "EXTREME SPORT" by most people, courtesy of things like The X Games and AST Dew Tour. In reality, there are 3 major facets of the sport, all characterized by riding a 20"-wheeled bicycle originally intended just for racing.
BMX Racing is a very intense sport. Many people (guys and girls) get started when they are very young, around 6 or 7 years old. Unlike other types of bicycle racing, the races are very short and explosive. Riders will rarely traverse more than 1000 meters in a moto (a moto is one round of a race day/tournament), lasting only maybe 45 seconds to a minute. Unlike longer races seen in road racing and mountain bike racing, there is no energy-conservation strategy -- you go 100%, 100% of the time. Events are held indoors or outdoors, in any season, all around the country. More info can be found at ABA BMX or NBL, two of the major sanctioning bodies of BMX racing today.
Most people seem very confused when initially introduced to flatlad. It's a very different way of riding a bicycle, when compared to either BMX racing or freestyle. It is, in a way, related to freestyle in that it is judged very subjectively by outsiders/contest judges. It is a show of style and balance, as the bike and rider almost never leave the ground, much less a small area. It is very difficult to explain the essence of flatland, but a TON more info can be found at Global-Flat.
Freestyle is exactly what it sounds like -- anything goes. Riders spend a lot of time getting tricks dialed in, and then put them together in lines. There is no definitive way to produce a mental image of what freestyle really is, since riders' styles vary so widely. Some of them prefer to ride dirt jumps (trails), some prefer riding skateparks, and some just prefer to use what's available to them in cities and neighborhoods (street). Right now, this is probably the most globally popular discipline, helped in part by recent media exposure. More people than ever are finding the joy in doing what you want, when you want (on a bicycle), and that's probably a good thing. It helps get kids outside, it's a good way to get some simple exercise, and above all, it's fun! However, BMX culture seems to be going the way of late '90s skateboarding, in that clothing, music and lifestyle are defining acceptance factors by elitists. Trends are created, followed and dumped byt the scene amazingly quickly, making it very hard for people outside the scene to understand what it's really all about. Recent news and some great photography can be found at BMX Online, OPCBMX and Cycles-N-Sports.