Enigma: a Question from WW2
The simple answer is also part of one weakness with all encryptions that use symmetric key, AKA pre-shared key. Key sheets that lasted 31 days where generated and sent out by courier or so. The weakness is ofcourse that if the enemies get their hands on it then they can read all the messages that used that key. 
And yes - sometimes the allied did get their hands on a key sheet and then they had the keys for one network for up to a month.