In reply to moot:
Your aim is to attach yourself securely to the top of the crag so you won't be pulled over the edge (or move for that matter) should your partner fall.
There are 1001 was of achieving this but all the good one share some common traits.
Good anchors - choose something solid to anchor to, stout trees, big boulders, threads (care - these often look better than they are), well wedged hexes, big nuts in solid cracks... you get the picture, big stuff.
Redundant anchors - you want at least two, there's no harm in three, you will occasionally cock up the odd one, this is your safeguard against that.
Equalised - all your anchors should be working for you at all times, they should ideally be sharing the load equally.
Independent - A failure of one should not lead to a failure of the others, eg. a nut either side of a block is no good if the block falls out.
Inextensible connections - A failure of any piece should not effect your positioning relative to the other pieces.
Position - You should be positioned so you can see your partner and you are well supported by your belay. You can stand but bear in mind what will happen if your legs buckle. You should have space to operate your belay device.
So, bearing in mind there are a few quick and simple set-ups to get you started:
eg: Good boulder and good nut nearby, both 3-4m back from the edge. Drop a sling over the boulder, seat it so it can't slip off then give it a tug to test. Clip your rope to it then walk carefully back to the edge* when you're where you want to be put an HMS on your tie in loop and clove hitch the sling rope too it, you now are secure (so could shout safe if you like). Walk back to the nut, clip the loose strand of rope to it, back to the edge and repeat the clove hitching. You're now properly secured to two good anchors and are 'safe'.
To add a third piece, just repeat the process though you'll need an extra krab for the clove hitch.
That's not the simplest technique but it's versatile and teaches you all the basics, you can adapt it from there to suit you, the kit you carry and the anchors you find so long as you bear in mind what you are actually trying to achieve. A good book will provide plenty of ideas.
*You're still on belay at this point.
jk