There are 4 wires in the usb cable. Power, ground, data+ and data-.
When connected to a power source you can leave the data lines floating, or tie them to ground. In the ipod, Apple uses them to set the charging current.
They expect the data lines to be set at some percentage of the power supply voltage
which the ipod uses to set the maximum current that it can draw from the usb power lines. Note that a usb device can ask the usb host how much current it may draw. Since the charger isn't a true usb host, Apple added an A/D converter to the ipod to measure the static voltage on the data lines. My USB charger device follows the Apple specification to set the max current allowed to 500ma. (The company I work for builds some iPod compatible hw and we got the specs from Apple).
Why build your own charger? In my case I had all the parts, I was too lazy to go out and buy one, and I like hacking hardware.