Cupcakes may be topped with frosting or other cake decorations. They may be filled with frosting, fruit, or pastry cream. A standard cupcake uses the same basic ingredients as standard-sized cakes: butter, sugar, eggs, and flour.
A cookie is a baked or cooked food that is small, flat and sweet. It usually contains flour, sugar and some type of oil or fat. It may include other ingredients such as raisins, oats, chocolate chips, nuts, etc.