It all depends where you are in the process. In the beginning, when you're first teaching independent sleep (either because LO is very young or because they've been relying on a prop (etc) up til now), you stay with them til they're asleep. But, gradually, you 'help' them less and less and withdraw your presence until you reach the ultimate goal, which is to be able to put them down in their cot awake, and leave the room, and they will get themselves to sleep.
You could try stepping away from the cot a little further each night until you are in the doorway, then closing the door!
HTH
anna
x