The soviets were putting offensive ballistic missles with nuclear warheads into Cuba. This was a serious threat to our national security. They could have nuked DC with little to no warning. We had to do something, and a blockaid (quaranteen) of Cuba to stop the weapon build up was necessary. They gamed out a lot of different possibilities, including a pre-emptive nuke strike on the USSR, but the blockaid was the only option that meant that we didn't have to invade Cuba, which could prompt the USSR to retaliate by invading West Berlin, West Germany, or some other country in Europe. Furthermore, invading Cuba could have forced the Soviets into using their nukes, or using their battlefield nukes.
It was a bad situation all around. Watch the movie 13 days for a pretty good, historically accurate account of the crisis.
Ryan
EDIT: Or go read a book... this is for a class right? Do your homework, son.