When you think it's done, take a gravity reading. Then leave it alone for 3 days. Take another gravity reading. If they are the same, and it is close to the target final gravity of your recipe, it is safe to bottle.
You will want to give the yeast some time to clean up after themselves once initial fermentation is complete. Generally, the first 5-7 days you will see a good deal of activity, then it will slow down considerably and may look done. Don't be fooled... it's not. It needs another couple weeks to clean up fermentation by-products like diacetyl and acetaldehyde that will cause off-flavors if left in the beer. When in doubt... wait another week