stencil buffer

Hi, imagine i want to calculate and write a background composed by some objects, but there will be movement not on the background but on another object. Can someone tell me how to use stencil buffer? or tell me about a good tutorial?

Thanks =)

[This message has been edited by hellox (edited 05-04-2003).]