Assuming you're talking about an unopened keg of beer, draft beer will last indefinitely in a kegerator. Once a keg is opened, however, the clock starts ticking and you have about 2-3 months before the beer goes bad. Of course, this assumes that your keg is properly sealed and kept at the correct temperature (around 45 degrees Fahrenheit).
So if you're planning on having a party or just want to keep your options open, it's best to stick with unopened kegs. But if you've got an event coming up and need to use an opened keg, don't despair – as long as you drink it within a few months, it should still taste great!