At the threshold of a sterile lab at NASA's Johnson Space Center in Houston, I pull on a white clean-room suit, a surgical cap and mask, booties and latex gloves. My host, a mineralogist named Mike Zolensky, swabs my digital voice recorder with alcohol to remove flakes of skin and pocket lint. He doesn't want any detritus to contaminate the precious dust in the room.

Once inside, Zolensky retrieves a palm-size glass box from a cabinet. The box holds a rectangular chunk, less than two inches across, of eerily translucent material. I lean in and squint at it but can't quite focus on anything. Zolensky turns off the lights and hands me a laser pointer. The red beam reveals thin streaks in the chunk that start at its surface and penetrate fractions of an inch, like the traces of tiny bullets. "Those are the comet impacts," he says. "It's beautiful to look at."

The tracks were made during the world's first—and only—attempt to chase a comet and bring a bit of it home. The NASA mission, called Stardust, sent a spacecraft to Comet Wild 2 (pronounced "VILT-too") on a seven-year journey that ended in 2006. It brought back the only material—other than moon rocks—taken directly from an extraterrestrial body.

Scientists expect the comet dust to yield clues about how our solar system and planet were formed. Earth has been through so much in its 4.5 billion years—volcanoes have erupted, mountains have risen and fallen, heat and water have chemically transformed rocks time and again—that scientists have trouble getting their hands on the earliest possible geologic evidence in what might be called showroom condition. It has all been buried or altered. In contrast, comets, which are about the same age as Earth, are pristine relics. "There's nothing left on Earth's surface that's nearly as old as these bits of crystals and minerals," says Carlton Allen, astromaterials curator at the Johnson Space Center. A comet, he continues, harbors the "starting material for our solar system, the stuff that came together to make everything we see."

Comets originated on the outskirts of a vast cloud of gas and dust that coalesced into our solar system more than 4.5 billion years ago. Crystals of ice far from the Sun gradually combined with dust to form trillions of comets, which have orbited slowly around the Sun ever since in a deep freeze far beyond Neptune. Only when gravity from a nearby star or some cosmic disturbance nudges them do they approach the Sun; then we see streams of gas and dust as the ice vaporizes—the signature tail.

The most famous, Comet Halley, is barely ten miles across, but it produces a beautiful tail tens of millions of miles long when its looping orbit brings it between Earth and the Sun every 76 years. (Earth will see it again in 2061.) Asteroids, too, are ancient, but most orbit between Mars and Jupiter, where the Sun has baked them for billions of years. Most of them are dense and rocky, some even metallic, shedding pieces that sometimes land on Earth as meteorites.

The travel plan of NASA's Stardust sounds like a Buck Rogers adventure. Swing far past Mars to within 150 miles of Comet Wild 2, which streaks by at 13,700 miles per hour. Catch fragments without destroying them. Travel back to Earth and drop a capsule into the atmosphere for a blazing nighttime re-entry over Utah. Parachute to the ground without crashing. "We were scared up to the last second," Zolensky says. "We still can't believe it really worked."

For all the impressive rocketry, the mission's most significant technology may have been the strange substance that caught the comet dust. Called aerogel, it's the lightest solid ever created. A slab the size of an average person would weigh less than a pound. A scientist once let me crumble some in my hand; it felt like brittle talc. Yet aerogel is tough. It's made of silica compounds arranged in an elaborate web that can snare particles plowing into it at up to six times the speed of a rifle bullet. The spacecraft carried two aluminum collecting trays shaped like oversize tennis rackets. Each tray held about 130 rectangular pockets filled with aerogel blocks smaller than ice cubes.

In the clean room, Zolensky returns the aerogel chunk to the storage cabinet and removes a bolted aluminum case. Inside lies an entire comet collection tray. It's worth about $200 million. "I'm always nervous about this part," he says. "I try not to drop it." He places the case on a stainless steel table, unbolts it and lifts the lid. "Air flows down from the ceiling, so the rule here is that we never stand over the tray," he tells me. Even with the mask on, I am acutely aware that I must not sneeze.

The aerogel cubes, tinged lu­minescent blue, look like puffs of breath exhaled on a winter morning and frozen solid. The laser pointer reveals scores of tracks marring the cubes' surfaces and interiors, some like sharp pinpricks, others like splaying roots.

A few dozen cubes are missing from the tray. Zolensky and his colleagues have cut out hundreds of small sections of those cubes. They remove an entire particle track by poking a pair of sharp glass fibers into the aerogel, a process that takes up to a day. The extracted piece looks like the clipped corner of a fingernail and has a particle at one end.

Seen through a microscope, the particle Zolensky shows me is jet black. Astronomers once pictured comets as gently disintegrating "fluffy ice balls." Then detailed photographs revealed that comets' outer rinds are blackened crusts, charred by the radiation of space. Ice and dust spew through fissures in the crust, eroding the comet's interior with each orbit. The Stardust samples—messengers from the inside of Wild 2—show that comets are dark through and through.

Under higher magnification, the dust particles look like exploded popcorn kernels. Stardust scientists were surprised to find that some of the comet's grains are made of minerals that form only at extremely high temperatures. It appears that these grains arose close to the Sun, inside the orbit of Mercury, in a blast furnace far removed from the calm, cold margins of the solar system where comets now drift.

No one had expected that the hot ingredients of the inner solar system mixed with the cold outer solar system billions of years ago. "It's a remarkable result," says planetary scientist Michael A'Hearn of the University of Maryland. "It's causing us to rethink how things got put together." It may mean that wind or radiation from the newborn Sun was stronger than expected, propelling the heat-forged grains deep into the solar system, where they merged with ices and frigid dust into comets.

The collection tray also captured evidence suggesting that comets may have helped seed life on Earth. NASA researchers found traces of glycine—one of the amino acids that make up the proteins in all living things—on the aluminum foil lining the sides of the aerogel cubes. The discovery, confirmed this past summer, suggests that comets contain some of life's basic molecules. Comets and meteorites colliding with the young Earth would have spread such compounds, possibly providing the ingredients for the Earth's first cells.

Stardust wasn't the only comet mission. NASA's Deep Impact spacecraft slammed a probe into Comet P9/Tem­pel 1 in 2005 and found that the crust was rigid but the layers underneath were weak and powdery. A European mission now en route, Rosetta, will try to land on a comet in 2014, scoop up some icy dirt and analyze it on the spot.

After we strip off our clean-room suits, Zolensky takes me downstairs to see the mission's return capsule. (It is now on display at the National Air and Space Museum.) The cone-shaped shield that protected Stardust's cargo during its fiery re-entry is about a yard wide. There's some dirt on it, Utah mud from the landing. The capsule's surface, a carbon composite mixed with cork, is burned and yields slightly to the touch. The spacecraft flew three billion miles—the most distant traveler ever to find its way home.

Robert Irion has written about black holes and new planets for Smithsonian.