For standard gravity beers, most brewers seem to leave it in the primary for 2 - 4 weeks - I usually do 3. But you want to be positive it's finished fermenting before bottling. Two days before bottling day, take a gravity sample. On bottling day, take another. If the gravity is the same, and somewhere around the predicted FG, and it's clear or slightly misty, it's ready to bottle. If not, wait a few more days and check again. Not everybody does this, but it's a good practice for safety reasons. You can get bottle bombs if you bottle before fermentation is finished.
Try to keep the beer at 70F or above for conditioning. If it's cooler, carbonation will take longer. I go for 3 weeks at 70 if possible.