There are many different styles of beer to generalize them into a single fermentation schedule. The best answer is to learn the fermentation schedule for whatever style you are brewing.
That said, I tend to generalize Pale Ales into a 3 week primary fermentation, then a few days of cold crashing, then 3 weeks in keg or bottle. They may, or not, start to taste better over the next few weeks.
For IPAs and Wheat beers, generally I like to ferment for 2-3 weeks and then bottle and drink as soon as they are carbed, and I have always found them to be better after a few weeks, YMMV.
For smaller beers, like a mild, 2 weeks is plenty. Carb and drink right away.
For stronger beers, I might ferment in primary for 3-6 weeks, then secondary for however long I felt like, before bottling. Or just primary for 6 weeks and condition in the bottle for 6 months to a year or more.
I think the most important things to remember about fermentation is to get the temp correct and consistent for the yeast you are using, aerate well, pitch the appropriate amount, and protect from O2 when handling your fermenting/fermented wort. As long as you allow the beer to ferment completely, the precise schedule it not nearly as important as the other things IMO.