How did ancient Olympic athletes prepare for competitions?

The games likely came to an end under Theodosius II, possibly in connection with a fire that burned down the temple of the Olympian Zeus during his reign