Apple iPad Camera Connection Kit
The "camera" part of the name is a little confusing, but this lets you plug USB accessories (like cameras or keyboards) into your iPad.
Caution It appears Apple has stopped producing these. For the time being, you can still find lots of these (still brand new) in places like eBay. Search for "Apple Camera Connection Kit MC531ZM/A" to find the exact part.
Do not buy a female-to-female USB adapter for the regular iPad USB cable. It won't work.
You may already have this cable if you have a printer or scanner. The standard A-to-B USB 2.0 cable is easy to find and is only a few dollars.
Do not buy a "USB 3.0" cable. It's a different shape that won't work.
Do not buy expensive $20+ USB cables. There is no reason to pay more than $5.
Troubleshooting If your keyboard isn't showing up in Synthesia, check your keyboard manufacturer's website to see if a driver is available. The iPad doesn't allow the installation of drivers, so this might be bad news. If the keyboard also has MIDI ports, try that instead of USB.
Once everything is connected, your keyboard should show up in Synthesia.
Head over to the Musical Devices section on the Settings screen to enable your device for input and output.
Then on the Music Input screen for your keyboard, play the lowest and highest notes so Synthesia knows how many keys your keyboard has.