Carbon fiber is a relatively new material to the bicycle industry. It is made of woven fibers that are essentially long threads of carbon atoms, the fabric is then laid up in a mold and resins are injected to solidify the final product. This makes carbon fiber much easier than metal to manipulate for specific purposes. The properties of carbon fiber composites, such as high stiffness, high tensile
strength, low weight, and excellent fatigue life cycles make composites a no brainer for bicycle construction. Carbon fiber can be made in so many different ways with different fabric structures and resins that the term carbon fiber can describe as many different things as the word metal.
Carbon fibers conduct stress down each fiber so this means in the lay up process designers can direct stress such as pedaling forces and road vibration in the optimal direction. Further more since the fibers can be laid up in layers they can make a single tube stiff in one direction and flexible in another(think optimal power transfer to the pedals while also flexing to absorb all of the road bumps.)
Carbon has a high strength to weight ratio, much higher than common metals. meaning that for a given weight a carbon part is lighter if it is the same strength as its metal counterpart. take a look at the strength to weight ratio from Calfee designs a carbon manufacturer and repair company based in California.
Many people are afraid of carbon for the way it fails and some even believe that it is not repairable but this is not the case. Because carbon is only harmed when fibers are cut it is possible to repair carbon laying up more layers on-top of a fracture. By adding several layers a frame can be restored to full strength, there are many companies around the US that repair carbon frames for between 150 and 500 dollars and some will even restore the paint making a broken frame look new.