To use it as a midi controller you need to connect a midi cable to the midi out jack on the keyboard and then connect the cable to a midi interface box, and connect that box to your computer with a USB cable. While the DGX-220 can connect directly to a computer via USB, I believe this is only to access the pre-made songs and lessons. To use it as a midi controller you need to use a midi cable.
Any of the products listed on the page below will do the trick:
http://www.zzounds.com/cat--USB-MIDI-Interfaces--2434
I have the Mark of the Unicorn (MOTU) FastLane USB MIDI Interface. I use it to connect my Yamaha P80 digital piano to my iMac and I have been happy with it.