Open the settings app and in the General settings section navigate to Keyboard > International Keyboards. Select "Add new keyboard..." and look for Japanese. There will actually be two options... Romanji and Kana... though this section only affects the on-screen keyboard. Select either one by tapping on it. Once you have added the keyboard tap on it again from your list of keyboards to bring up its settings. Under "Select Hardware Keyboard Layout" choose Kana.
Now to switch to the Japanese keyboard while a physical keyboard is connection tap command+space bar (If you are using a Windows-style keyboard, the Windows key will function as "command"). To switch while using the on-screen keyboard just tap the globe icon to the left of the space bar.
PS To the best of my knowledge there is no way to input katakana directly with the iPad. You have to type it out in hiragana and then convert.