So many factors involved.....beer type, yeast type, OG, temp, etc.
But in general for an average 1.050 ale I go from brew to keg in about 2.5 to 3 weeks. I have been back and forth on whether I need to rack to secondary or not. There is lots of good discussion on the topic here on HBT. Sometimes I use a secondary, most times I don't. If I do, I would brew, into primary for about 7 days, then rack to secodary, let sit for 10 - 14 days, then into the keg. Keg condition for a couple weeks (depending on variety) and serve.
For lager it's a much longer process....primary for 2-3 weeks, into the keg to lager, carb, then drink as ready.
You will get to know your yeast. Some varieties blow through fermentation, some take a little longer. Some clean up the beer really fast, others like an extra week in the fermentor to clean up.
Hope that helps a little.
Alan