Most carbonation in kegs is done using pressurized CO2 from a gas cylinder, a process called force carbonation. The fastest results can be achieved when the beer in the keg is at a cold temperature. This will let the CO2 diffuse into the beer more efficiently and at a faster rate.
Keg beer will remain fresh if dispensing with CO2, while maintaining the proper temperature and pressure: For non-pasteurized draft beer about 45-60 days. For pasteurized draft beer about 90-120 days.