How do I connect a Digital Potentiometer?
You'd use it just as you would an analog pot, with caveats. 


The voltage on all the pins must remain within the supply voltages of the device or less. The datasheet would have specific details. The ICs usually have protection diodes which would clamp any voltage beyond the allowed range. If the situation persists, you can damage the IC. 
The resistance when the IC is turned off is usually infinite. Youd have to power it up for the wiper (centre pin of a regular pot) to be connected. 
When the device is powered up,  it may not be in the condition it was it when it was powered down. If this is going to cause trouble,  such as a low resistance path between V+ and ground,  say,  you should take precautions. 
They usually can deal with much less current than an analog pot can. Be careful and follow ratings carefully.  ICs are more expensive than analog pots, and sometimes harder to replace and/or debug.