First off, there's tons of information out there on various types of anchors, different ways to equalize and secure them. One book I'd recommend is How to Rock Climb. Different anchor types each have their pros and cons. The best way to learn to build solid anchors is to have a more experienced climber, particularly someone who knows the area, walk you through building an anchor step by step.
Personally, I've been taught and often use two different methods for top roping, depending on how far away from the cliff edge I can place protection.
Specific to top-roping, you have more time to place gear and double check everything. While there's often more stress in the system, you can also find more bomber placements and use sturdier rope, etc. In many places, two points of solid pro are just fine, but three is almost always better. One point should almost never be used, even if it's really solid, except perhaps in specialized situations.
Anchor position and attaching the rope
In both cases, the anchor should be long enough so at least the carabiners you're going to attach the top rope to are hanging over the edge. Many people use two locking carabiners facing opposite directions, as a just in case, though one burly locking carabiner is not unheard of.
I've never had any specific issues building an anchor at the top of a cliff. If needed, I'll place an extra piece of pro to clip myself into, or use the same pro as the anchors. I make sure the anchor falls where I want, and test it from the top before I toss the rope down. Sometimes it helps to have someone below looking at the route to make sure you've got the right spot. They can also give the rope a good tug while you inspect the protection.
Two/Three point cordelette anchor
I use 7mm PowerCord cordelette that was about 25ft, tied together with a double fishermens. You can also use a webbing cordelette, or a piece of webbing tied with a waterknot. Loop the cordelette through your protection, and ensure the knot is not in the way. Then pull the strands between the pro with your fingers, until it looks about like the image below, draped towards where you want the rope to fall.
Grab all three loops, and adjust left or right, until the force on each end feels balanced, then tie a figure 8 (or a figure 9) behind the loops.
The pros of this method are its simplicity, and that any one strand or piece of pro could fail, and the failure wouldn't cause much change in the rope's position or exert a lot of stress. The con is that you're using essentially one rope and so there's a greater risk if something happened at or below the knot.
Two/Three point anchor with static rope or webbing
In some cases, you need a longer anchor than you can easily get with a cordelette. In these cases I'll use webbing or static rope. I often use two separate ropes here, which could be cordelettes or single strands. It's more difficult to equalize since you'll need to approximate where the ropes should meet before you fully tie off extra slack.
The same basics apply though, and the upside is that although if one piece failed, there would likely be more change in the ropes position, there's overall more redundancy since the carabiners holding the rope go through the loops of both separate strands.
Neither of these methods are the best or end all be all of top rope anchors. There's always a few ways to set an anchor in a given spot. I'd love to hear others chime in with common top rope anchors they use, or hear critiques. One setup that is always difficult for me is top belay systems over water. As always, test your anchor, and double check yourself and your partner, before climbing or rappelling. Also, apologies on the images, since they are not mine and don't do the best job of showing an anchor over a near vertical cliff.