Solid-fuel rocket engines were the first engines created by man. They were invented hundreds of years ago in China and have been used widely since then. The line about "the rocket's red glare" in the national anthem (written in the early 1800's) is talking about small military solid-fuel rockets used to deliver bombs or incendiary devices. So you can see that rockets have been in use quite awhile.
The idea behind a simple solid-fuel rocket is straightforward. What you want to do is create something that burns very quickly but does not explode. As you are probably aware, gunpowder explodes. Gunpowder is made up 75% nitrate, 15% carbon and 10% sulfur. In a rocket engine, you don't want an explosion -- you would like the power released more evenly over a period of time. Therefore you might change the mix to 72% nitrate, 24% carbon and 4% sulfur. In this case, instead of gunpowder, you get a simple rocket fuel. This sort of mix will burn very rapidly, but it does not explode if loaded properly. Here's a typical cross section:
On the left you see the rocket before ignition. The solid fuel is shown in green. It is cylindrical, with a tube drilled down the middle. When you light the fuel, it burns along the wall of the tube. As it burns, it burns outward toward the casing until all the fuel has burned. In a small model rocket engine or in a tiny bottle rocket the burn might last a second or less. In a Space Shuttle SRB containing over a million pounds of fuel, the burn lasts about two minutes.