SPI data modes

I was going through the SPI section in Atmega328P datasheet and came across this:
It mentions different modes. Two terms involved are sample and setup. I don’t quite understand them. Clock Phase and polarity concept is also not so clear to me… can someone do some explanation on this?
I did a bit of googling, but not much help there.


Here is a good explanation. Modes have to do with the clock polarity and the data capture. http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus