Guns are basically like cannons – a tube with an open end and a closed end. If you put some gun powder into the tube, then something to fire like a cannon ball, you’re ready to go. You set off the gunpowder which causes an explosion that is channelled down the tube, the expanding gases cause the projectile to fire out of the tube and it usually has enough energy to do damage.
Bullets in guns have the gun powder bit (propellant) and the projectile built into a casing. When you pull the trigger, it ignites a primer which causes the propellant to explode and forces the rest of the bullet out of the barrel.