Check out taut line hitches. They're a great knot to know. To answer to your question, you hook the loop over the tent peg so it just slides freely. You adjust the tension by holding the plastic thingy at right angles to the rope (or at whatever angle lets it slide freely) and sliding it towards the tent.

This makes the loop bigger, but tightens the line. You rely on the line tension to keep the line from slipping off of the peg.

Bear
_________________________
No fire, no steel.