What causes a car to die while driving and not restart?

I had this happen to me once. It was a bad alternator.