Why Did the Vietnam War Happen?

The French had been getting clobbered by Communist forces and America took over. It was basically said to check the spread of communism.