Opium is a drug derived from the juice of unripe poppy capsules. It contains important alkaloids like morphine, heroin and codeine. Because these are classed drugs, the growing, transportation and manufacture of medicines from poppies are strictly controlled.
A narcotic is any drug derived from opium. This includes Vicodin and oxycodone.