Thunder is basically the result of the lightning bolt "exploding" in the air.
Lightning bolts are incredibly hot -- anywhere from 30,000 to 50,000 degrees. (That's hotter than the sun!) When that intense heat pierces the air, the rapid heating of the air creates an explosive shock wave that races away from the bolt at speeds greater than the speed of sound.
That creates a sonic boom, which we know as thunder.
If you're near where the lightning bolt struck, the thunder will sound like an explosive clap. However, more distant strikes will sound more like a rumbling as the sound waves spread out and echo off the ground or nearby buildings.