You're correct to point out that capsules—the cap covering the cork on most bottles of wine—used to contain lead. Concerns over lead poisoning meant they were phased out by the 1980s, as were lead crystal decanters. These days you'll find bottles with foil, tin-coated and plastic capsules, or even with none at all.
Plastic corks are made generally from polyethylene, a malleable material that is melted down and turned into “foam” that imitates the porousness of natural cork.
First of all, the glass used in most modern wineglasses no longer contains lead.
Historically, this foil (known as a wine bottle's “capsule”) helped protect bottles from insects and other vermin that might be tempted to nibble at the corks. These days, it's considered a part of the wine's packaging—you'll notice that some producers use it as an extra canvas to get their branding message across.