How did the Olympics of ancient Greece start and when?

It was a religious festival of the god Zeus, celebrated with athletics, chariot racing and other games and contests, which was held each four years from 776 BCE.