Corroded Statue of Liberty - from Wikipedia
Corrosion is not necessarily a BAD thing. It is galvanic corrosion that makes a battery work. Still, you do not want to try to use your expensive bike components to power your headlight.
Enough of that, what about corrosion and composites, you might ask? I'd respond it is a reasonable question, given the title of this post. Well, there's good news and bad news. The first, is that your new carbon bike will NOT corrode away any time soon. In point of fact, it is THE most "noble" material used in bicycle construction. It is even more stable than gold. You see, materials are susceptible to galvanic corrosion in the presence of a conductor and a more noble material. If you look at the figure below, you'll see that carbon is at the very top (I did not include materials such as gold which are only slightly worse than carbon). The "steel is real" crowd will be relieved to see that their bike material of choice IS, in fact, better than aluminium. Bringing up the bottom are things like zinc and magnesium. As I recall, a couple of years ago, Colnago built a bike with a Magnesium frame. Just because you CAN do something does NOT mean it is a good idea.