Try the simple method of scraping away glue from the duct tape with your fingernails. If this works, there is no need to try anything else. However, move on to the next step if this does not work.
Mix a small amount of mild detergent in water. Leave the piece of cloth soaked in that mixture for about half an hour. Lightly scrub and check if the glue goes away or not.
For non-washable clothes, make use of Afta Cleaning Fluid or K2r Spot Lifter. Apply cleaning liquid according to instructions written on the bottle.
For washable clothes, there are a number of ways in which messy glue from the duct tape can be dealt with. Try applying rubbing alcohol on the affected part of the cloth. It will loosen up bonds holding the glue secured to the piece of cloth, making it easier to remove the glue.
Consider using solvents such as De-Solv-It or Goo Gone. These solvents can prove very effective when trying to remove duct tape from clothes. Work in small sections and scrub out the glue before moving on to next section of the cloth. It is claimed that even the stickiest of glue stains can be removed using this method.
Another possible way to remove duct tape from clothes is to use hairspray. Liberally spray hairspray onto the affected area. Allow enough time for the hairspray to set properly. Wash the fabric with warm water and mild detergent.
If nothing works, use WD-40. The WD-40 solution will soften up glue from the duct tape, thus making it a lot easier to remove the glue.