It depends on whatever the clock would have done without a penalty. So if there was an incomplete pass on a play with a flag for holding, the clock would stay stopped until the snap because of the incomplete pass. But if there was a hold on a running play that ends in bounds, the clock would start on the ready for play signal because without the penalty it would have been running. The exception to this rule is that if the Referee judges that the fouling team could gain an advantage he can start or stop the clock. So if the offense is trying to run out the clock and fouls, the Referee can hold the game clock until the snap so that the offense can't run off extra time because of the penalty. The other side of that would be if there was something like an intentional grounding, the Referee could start the clock on the ready for play since the offense illegally stopped the clock.