Gunpowder made from charcoal, sulfur and potassium nitrate is called black powder. It is not used much anymore, because it makes a lot of smoke when it explodes, and it leaves chemicals in the gun barrel that make it corrode.
To solve these problems, smokeless powder was invented. High explosives like guncotton (cellulose nitrate) were too powerful to use in guns and cannons. However, they could be diluted with alcohol or similar liquids to make a jelly that would harden and could be cut into tiny pieces. The result was a less powerful explosive that did not blow up the gun barrels. It was still three times as powerful as black powder, and it made very little smoke.
Alfred Nobel, who invented dynamite, also invented a smokeless powder called Ballistite, made from camphor, guncotton and nitroglycerin. Later, a similar mixture of nitroglycerin, guncotton, and petroleum jelly was made, and named Cordite because it was made into grains by forcing it out of little holes so it looked like string (or cord). The camphor and petroleum jelly slow down the rate of burning, so the powder is not so strong that it destroys the gun barrel.
Modern propellants are still called gunpowder, even though they aren’t powders. They are little balls, flakes, or rods. They are often coated with graphite. Graphite is a gray powder form of carbon, and it conducts electricity. Conducting electricity is important, since it prevents static electricity from building up. A spark of static electricity could cause the gunpowder to ignite.