"The effects could well be called unprecedented, magnificent, beautiful, stupendous, and terrifying. The lighting effects beggared description. The whole country was lighted by a searing light with the intensity many times that of the midday sun. It was golden, purple, violet, gray, and blue. It lighted every peak, crevasse and ridge of the nearby mountain range with a clarity and beauty that cannot be described but must be seen to be imagined."
- Brigadier General T.F. Farrell's official report on the Trinity test
On July 16, 1945, at 5:30 in the morning local time, the first atomic bomb in history was detonated near Alamogordo, New Mexico. It was witnessed by high military officials and the scientists who had built it; J. Robert Oppenheimer, who led the efforts, famously thought of a line from Hindu scripture: I am become Death, the destroyer of worlds. But all he said was "It worked." The test's director, Kenneth Bainbridge, replied, "Now we are all sons of bitches." Afterwards, Bainbridge dedicated himself to ensuring that nuclear technology remained under civilian, rather than military, control, and fought to end further nuclear testing.
There was serious doubt as to whether the Trinity test would work — enough that a 240-ton steel canister was built to hold the Gadget, as the bomb was nicknamed. If nuclear detonation failed to occur, the canister would be enough to contain the conventional explosives used in the bomb and permit the recovery of the precious plutonium. The scientists at Los Alamos decided at the last minute not to use the canister, but instead left it on a steel tower half a mile from the Gadget to see if it survived. It did, though the tower it was sitting on didn't.
You can buy souvenirs from the Trinity test: bits of a mineral called "trinitite", a light green glass that's mildly radioactive, formed from sand fused together by the heat of the blast. Most of the glass produced, though, has been buried as nuclear waste by the government. You can also tour the Trinity site if you want; residual radiation has faded to about ten times normal background radiation, not enough to harm you during a brief visit.
The nuclear chain reaction
Radioactive atoms are ones that have unstable nuclei. The nucleus of a radioactive atom will eventually decay, releasing some sort of radiation and becoming a different sort of nucleus in the process. Since radiation is a form of energy, and energy is the same as mass, atoms become lighter after they undergo radioactive decay. Usually, when an atom undergoes radioactive decay, it will release a bit of light (in the form of a gamma ray, or a particle. But there's another type of radioactive decay. Fission happens when an atom's nucleus breaks into two smaller pieces, releasing neutron radiation in the process, as well as heat. The heat comes from the binding energy of the nucleus, the force that holds the bundle of neutrons and protons together. The neutrons are the interesting part.
You see, if the material in question is fissile — essentially, if it is one of the materials (like uranium-235 or plutonium-239) that can be used to make atomic bombs or fuel nuclear power plants — sometimes it undergoes spontaneous fission. Most of the time, when an atom of U-235 or Pu-239 decays, it undergoes normal radioactive decay and shoots out a particle or some light. But sometimes, it fissions, releasing between one and three neutrons and turning into two smaller atoms; if one of those neutrons strikes another nucleus at the right angle and speed, it can be absorbed by the nucleus, making it heavier. The now-heavier nucleus is unstable, and will likely spontaneously fission almost instantly, releasing even more neutrons, which in turn strike other nuclei. This is the nuclear chain reaction.
It's all a matter of probability, of course. Whether a fissile atom decays or not during some period of time is just a matter of chance; whether it releases a neutron that strikes another nucleus is a matter of chance as well. If you have a larger chunk of fissile material, the neutrons inside it are more likely to hit other nuclei rather than flying off into space. If the chunk is a sphere, they're obviously more likely to run into something else than if it's spread into a rod or a sheet. If each atom that fissions leads to the fission of exactly one other atom — that is, if one of its neutrons strikes another nucleus and that nucleus breaks apart — it's called a critical mass. Nuclear reactors maintain their cores precisely at critical through the use of control rods and moderators, which together ensure that the right number of neutrons are shooting through the core at the right speeds to lead to fission at a controlled rate (except, of course, when that doesn't work).
But a controlled reaction is not what you want in an atomic bomb. To make a great big explosion that destroys a city, you need a supercritical mass of U-235 or Pu-239, one in which every fission releases neutrons that lead to the fission of more than one other atom, on average. The atoms then break down at an exponentially growing rate, until an explosion happens that destroys the weapon and everything near it. The real challenge, then, is making the explosion happen fast enough that a lot of the material fissions before the weapon blows itself apart.
When the Bomb doesn't go boom
If an atomic bomb blows itself apart before much fission happens, it's called a fizzle. North Korea tested a nuclear weapon in October, 2006 that is suspected to have fizzled — traces of radioactivity in the atmosphere confirm North Korean claims that the explosion was some sort of nuclear weapon, but it must have measured less than 1 kiloton, compared to 13-16 or so for the bomb dropped on Hiroshima, or 15 in the case of India and Pakistan's initial nuke tests. A one kiloton explosion is minuscule by the standards of an atomic bomb and it suggests that something went wrong for North Korea (you know, beyond being a desperately impoverished Communist backwater led by an aggressive megalomaniac with platform shoes and bad hair).
The key to making an atomic bomb work is to make the fissile mass at the center not only go supercritical but to make it go very, very supercritical. Once the exponentially growing chain reaction starts, it's only a matter of nanoseconds before the bomb is blown apart; making the most of those nanoseconds means making as much of the material fission as possible in that time. All you need to do to make a mass go supercritical is gather a sufficient amount of it together in a lump, but it takes a lot more than that to produce a mushroom cloud.
Gun-type weapons
The first idea for an atomic bomb worked in a simple way: one mass of fissile material was to be shot at another one, forming a single, supercritical mass. Little Boy, the bomb that was dropped on Hiroshima, was a gun-type weapon. What follows is readily gleaned from common sources, though much of it is not certain, as for some odd reason Uncle Sam likes to keep the precise design details of nuclear weapons secret. Most of the information out there about specific U.S. nukes is based on declassified material, but doubtless some of it is based on speculation.
Little Boy used a bullet in the form of a 38 kilogram hollow cylinder of enriched uranium-235 shot onto a 26 kilogram spike. Surrounding the assembly was a "tamper" made of tungsten carbide, which both helped hold the material together very slightly longer once the chain reaction began, and reflected escaping neutrons back into the fissile material. This model is quite simple, so simple that it wasn't even tested prior to use, because the scientists who built it were certain of its success. Well, there was another issue as well — there simply wasn't enough U-235 available for two weapons. U-235 is needed for a gun weapon — and that's a problem, since U-235 only makes up 0.7% of natural uranium deposits, with the more common U-238 making up the rest. But since U-238 isn't fissile, it was necessary to enrich the uranium for Little Boy to 80% U-235, which requires advanced technology today and was an even more difficult task at that time.
There are a number of problems with gun-type weapons. They're substantially less efficient than the other method, and the simple design means it would be easy for a gun-type weapon to be triggered accidentally — potentially even without the propellant being ignited, in the event that the bomber crashed. But one of the chief problems is the possibility of a fizzle if the bomb detonated too early. The uranium inside a Little Boy-style weapon becomes supercritical a bit before the two components are fully assembled. The difference is a matter of milliseconds, but there's nevertheless a substantial risk that a spontaneous fission could happen in the uranium while the projectile is still shooting down the barrel toward the spike (remember that the chain reaction is kicked off when a nucleus fissions, releasing neutrons that strike other nuclei). If the chain reaction is triggered too early, the components aren't in their optimal configuration when the chain reaction occurs and the bomb fizzles. Spontaneous fissions don't happen all that often — in the uranium present in Little Boy, about 70 occurred per second, and the period between criticality and full assembly was about 1.4 milliseconds long, leading to an approximately 10% chance of premature detonation.
Implosion weapons
Initially, it was thought that they could build a plutonium-based weapon along the same lines, shooting one projectile at another. But the plutonium-239 (the fissile isotope) produced in nuclear reactors is inevitably contaminated with small amounts of plutonium-240. Pu-240 is not fissile — that is, it can't take part in the nuclear chain reaction because it doesn't fission when it's struck by a neutron. However, it still sometimes spontaneously fissions, releasing neutrons. In fact, it releases many, many more neutrons than Pu-239 does. This meant that the smallish possibility of a fizzle that exists with a uranium gun is a virtual certainty with a plutonium gun. This led to the development of the implosion-type weapon. The Gadget used in the Trinity Test was an implosion weapon, as was Fat Man, which was dropped on Nagasaki.
An implosion weapon works by crushing a hollow sphere of fissile material together using conventional high explosives; by squeezing the ball of plutonium (known as the 'pit') at the center of the weapon together, it becomes supercritical, since at those densities a neutron that is released is much more likely to hit another nucleus. Fat Man's pit was compressed to about twice its original density; modern weapons can compress their plutonium cores to four or perhaps even five times, creating even larger yields.
But doing this is an immense technical challenge; it's necessary to create a perfectly spherical shockwave to compress the pit. Any weak spots in the shockwave will simply cause the gooey nuclear center to spurt out, causing a fizzle at best. The design of Fat Man involved 32 detonators around the outside of a soccer ball-shaped assembly of explosives (fans of polyhedra will know it as a truncated icosahedron). Each of the 32 pentagonal and hexagonal sides of the soccer ball was a carefully designed 'explosive lens' that used a precisely machined combination of slower and faster explosives to create a shockwave that was perfectly spherical instead of soccer-ball-shaped. Later bombs used even more explosive lenses — as many as 92, eventually, although it has been speculated that modern atomic bombs use a slightly different arrangement, with a pit that is an elongated sphere and only two explosive lenses, with one detonator at each end. These explosive lenses, if they exist at all, use an even more sophisticated combination of explosives that, as with other implosion bombs, produces a spherical mass of plutonium during detonation.
Just inside the explosive lenses in Fat Man (as with many or possibly all implosion bombs) was the amplifier, another layer of high explosive to make the shockwave a bit bigger. Interior to that was the pusher, a layer of low-density material (in this case, boron and aluminum) designed to trade some of the shockwave's amplitude for longer duration, allowing the entire pit to be compressed at the same time. Inside of that is the tamper, made (in Fat Man, at least) from natural uranium; as in the case of Little Boy, it served the purpose of helping to confine the reaction for just a tad longer and reflecting stray neutrons back into the pit.
The pit itself was 6.2 kilograms of plutonium (note that this is less than a tenth the size of Little Boy's, while Fat Man's yield was about 25% higher, indicating just how much more efficient the implosion design is.) In the center was the initiator, a combination of beryllium and radioactive polonium-210 in a carefully designed (like with everything else here) sphere; the layers were kept separate with thin layers of gold to prevent triggering the weapon early (which causes what, class? A fizzle!) The initiator's purpose was to release neutrons when crushed to start the chain reaction in the plutonium. An initiator is not absolutely necessary, but it allows the reaction to happen at a much faster pace and thus consume more of the fissile material before the bomb vaporizes.
Et cetera
All modern nuclear weapons are based on the implosion design. South Africa briefly had a weapons program, which used only gun-type weapons, while it's believed that the United Kingdom never built a gun weapon at all, moving right into implosion devices. The first Soviet nuke was a nearly exact copy of Fat Man, produced with the help of information stolen by Klaus Fuchs. It seems likely that nuclear weapons programs in smaller, less technically advanced countries use gun-type devices, although obtaining uranium-235 is not easy. Most of the nuclear technology that Saddam Hussein wasn't actually trying to acquire in the lead-up to Gulf War II was equipment to enrich uranium, suggesting that Iraq would likely have tried to produce gun-type devices, in the imaginary alternate universe in which they were actually producing nuclear weapons. On the other hand, the concerns surrounding the building of nuclear reactors in unpleasant little Third World countries exist because some types of reactors produce plutonium, which if you recall can only be used with implosion-type weapons.
Most a-bombs nowadays also use a small amount of fusion — as with a hydrogen bomb — in their design, usually in the form of tritium gas (a heavy, radioactive isotope of hydrogen) injected into the pit prior to launch. When fission begins, it compresses the tritium enough to lead to fusion, which releases a shower of neutrons back into the fissioning material and making it explode that much more violently. The fusion itself is only a small contributor to the bomb's yield; the gain is largely from making fission happen more efficiently.
The largest pure fission bomb ever built was the 500 kiloton Ivy King bomb, built in 1952 alongside the first hydrogen bomb, Ivy Mike. Ivy King was basically a backup plan in case the hydrogen bomb didn't work. These larger weapons were deemed necessary because of the Soviet Union's nuclear program, marking the beginning of the Cold War arms race. It was designed by physicist Ted Taylor, who like many other physicists who worked on nuclear weapons, became an activist for disarmament.
References
"Chronology on Decision to Bomb Hiroshima and Nagasaki", nuclearfiles.org (http://tinyurl.com/zg3cz)
"Nuclear Chain Reaction Animation" (http://lectureonline.cl.msu.edu/~mmp/applist/chain/chain.htm)
CNN: "North Korean test 'went wrong,' U.S. official says" (http://www.cnn.com/2006/WORLD/asiapcf/10/10/korea.nuclear.test/index.html)
"Nuclear Weapon FAQ" (http://nuclearweaponarchive.org/Nwfaq/Nfaq0.html)
"Little Boy" (http://tinyurl.com/29hann)
"Fat Man" (http://tinyurl.com/yoytaj)
Historical information on particular tests courtesy of Wikipedia