My advice, pick up Complete Joy of Homebrewing by Charlie Papizan and/or John Palmer's How to Brew. It's my go-to advice for all newbies to advanced brewers. If you don't have them in your library, you need them.
Now, about your question. The answer is more complex and yet simple than you think. Some fermentations finish much faster than others, while some can take many weeks or months. Want to know when your fermentation is done for ANY of them? Just take a hydrometer reading. Hydrometers measure the dissolved solids in your liquid. Your liquid in this case would be wort, and the solids you're measuring are the dissolved malt sugars in the wort. If you take a hydrometer reading right at the beginning of fermentation when you add the yeast, you'll get an OG reading (Original Gravity, or in my case, Original Gangsta). This reading tells you the total dissolved malt sugars in your beer before fermentation starts and can be typically anywhere from 1.030 to 1.200 depending on the style and how heavy handed the grain bill is.
Yeasts consume the malt, reproduce, make more yeast, fart out CO2 and pee out alcohol as waste products. This consumption and conversion process is what drives fermentation and the yeast will continue this cycle until one of a few things happens:
A) They run out of digestible malt sugar
B) They run out of oxygen or nutrients
C) The alcohol, which is toxic to yeast, builds up so much they start to die off
D) Some sort of weird infection happens (rare)
(an 80's band) reforms in your living room and demands vegamite
F) Worldwide nuclear war
Usually, it's the lack of food or available nutrients that ends the fermentation. You can monitor this process yourself by taking a few subsequent gravity readings with your hydrometer. Sanitize a wine thief or a turkey baster and sneak out a little beer from your fermenter and use it to fill the hydrometer testing tube. Write that number down, then measure it the next day, and so on. Continue to do this until the hydrometer readings are consistently the same for 2-3 consecutive days. When that happens, you know that fermentation is mostly complete.
Notice I said "mostly complete," and not "totally complete." While it's true, the fermentation of alcohol has finished, not all alcohols are alike. Yeasts can produce lots of interesting alcohols under odd conditions, such as phenols, acetylaldehide and diacetyl. Many of these "fusel" alcohols are created under stress, or as precursor alcohols that can be re-consumed by yeasts and converted over into more palatable esters. Extremely young, unconditioned beers will sometimes have "green" flavors like vegetal, green apples or even buttery flavors until they've been allowed to condition. So, even though your gravity readings have stopped falling, don't rush to bottle the beer immediately. It's a wise practice to let the beer "rest" for another week in the primary to allow the yeast to clean up any of those fusel alcohols. This is referred to as a Diacetyl Rest.
There's no rush to bottle and no real reason to rack to a secondary for most beers. Leaving the beer in the primary fermenter on the yeast is just fine for up to three months or more. Some people might try to convince you to rack off the yeast due to yeast death and an off flavor that comes from autolysis. This phenomenon has been largely disproved by homebrewers for small batch brewing in that it requires the death of a heck of a lot of yeast in large yeast-crushing batches with conical fermenters to create enough off flavors to hurt your batch. In other words, autolysis is something big batch brewing has to contend with, but the average homebrewer with batches under twenty gallons or so, not so much.