The best way to tell if your primary fermentation is done is with a hydrometer reading. If your gravity from the reading stays consistent for 2-3 days in a row, the main part of the fermentation is done and it is safe to bottle them.
Now, the reason to let the beer age a bit has mostly to do with what the yeasts produce during the initial feeding. Yeasts often produce more basic fusel alcohols and diacetyl during the initial fermentation which produce some off flavors. Fusel alcohols are also the usual suspects that cause bad headaches and hangovers in beer as well. Your yeast will eventually start to consume these more basic alcohols when there are no more cheap malt sugars left to feed on, so it's good to let the beer have a nice "Diacetyl rest" for a week or so to clean itself up. You will notice very little (if any) airlock activity during this time and the beer will just appear to sit there. This is normal.
The rule of thumb for a lot of ales is roughly three weeks time from brew day to bottling to allow the beer sufficient time to clean itself up. This produces a much better quality beer, so letting it sit a full three weeks is usually a good thing to do. Can you bottle sooner? Sure. There's no magic formula. You can bottle anytime after the primary fermentation has completed. You just might get a better beer if you let it sit on the main yeast cake for another week.
You will still have plenty of viable yeast for carbonating your beer. When your yeasts flocculate out of solution (i.e., go dormant and fall to the bottom of the container), they come to rest at the topmost layer of the trub. The simple act of racking (transferring) your beer from your fermentation vessel to a bottling bucket (hopefully using a siphon hose or a racking cane) will ensure you get a little residual yeast into the bottling bucket, either by accidentally swiping the trub with your racking cane, or just the suction of the beer flow as it moves from one vessel to the next.
With most ales, you'll need about 1 cup of table sugar (3/4 of corn sugar or dextrose) which has been dissolved into a simple syrup for priming. To make a simple syrup, put a pan on your stove and fill it with a cup of water. Bring it to a boil and stir in your sugar. Stir it until it completely dissolves and keep it at a low boil for 15 minutes to sanitize. Then, pour it into the bottom of your bottling/kegging bucket and rack your beer directly on top of it.
Bottle and cap your beers and then let them sit in the dark in a room temperature area of your house for about three weeks to fully carbonate. They'll reach about 1/4 carbonation at one week, 2/3 at two and completely carb up at three weeks time. I stick my bottles in a disused closet on the top shelf, which in the winter time here, remains about 70 degrees f. Then, let your bottles chill in the fridge a full 48 hours prior to serving. Doing this helps ensure the CO2 is re-absorbed back into the beer as cold beer has more CO2 holding capacity than warm beer.
If you follow these steps, you will be rewarded with a fine beer. If you rush things (which new brewers often do) then you'll have mixed results. All the same, good luck!