You must stay on property and book a package including at least a one day park ticket to use the DDP. There is plenty of info on the Disney website and allears.net has info too - I believe (I don't frequent that website). The cost is around $40 per adult per day and $10 per child per day for the basic dining package. This year they added additional packages to the plan that give you more "meals" but also increases the price.
I can't remember the pricing exactly, but I believe for adults (10 years and older) it is $34.99 per night of stay and for children (3-9 years old) it is $19.99 per night of stay. So, if you stayed 5 days, you would pay for 4 nights of the Dining Plan.
You must stay in one of the Disney Resorts to get the Disney Dining Plan.