The first character to be called the Flash was known as Jay Garrick. This was back in the Golden Age. He gained his powers through exposure to a "hard water" experiment. The Super Speedster was so popular that they made other characters with the same powers, i.e. Johnny Quick.
The second was Barry Allen, who gained his powers when a lighting bolt smashed through a window and hit a bookshelf that had a every chemical known on it. The chemicals splashed on Barry, making him the fastest man alive... or almost. The Silver-Age Flash had two races with Superman to see who was the fastest. Both races ended up in ties. But boy, what speed did Barry have! He could run so fast that he could travel to the future, or go back in time. He could also vibrate through walls. He would do this by vibrating his molecules so fast he could pass in between the molecules in the walls. His comic had a significant event in comic book history, because in Flash #123 the Golden Age Flash and the Silver Age Flash meet. This meeting would have consequences that would lead to Barry's death, and many more changes in the DC universe. Go back to the Main Page and read about Flash #123 in detail, under the 1986 Crisis of the Infinite Earths storyline.
Barry Allen died in Crisis of the Infinite Earths #8 (bless his soul). You can read more about this in Part 5. A later re-telling of this story says that Barry Allen didn't die, but became a being of pure energy and traveled backwards through time, becoming the very lighting bolt that gave him his powers. Barry did this to guarantee that he would re-live his life with superpowers. The Flash comic book would last 350 issues. The Flash in real time lasted about 30 years.
Before Barry died he had a sidekick, then known as Kid Flash, (aka Wally West). After Barry died, Wally West took on the name and the costume of the Flash, the latter which he still wears today. At first Wally West didn't have the same speed as Barry Allen did. Still, for some strange reason he defeated Superman in a race to determine the fastest man alive (that Crisis storyline de-powered Superman). Wally West has since gained full use of his speed powers.
Now there is another "Kid Flash", but instead of recycling the name they call this one Impulse. He is Bart Allen--Barry's grandson--who has come from the future to learn how to control his powers. He now has his own title, wherein his mentor is no longer Wally West but another super speedster called Max Mercury. DC has always maintained that as long as they are in business, there will always be a Flash (Yay!!).