Hiragana is used for Japanese sounds. Katakana is used for foreign or 'loan' words. Kanji comes from Chinese and is used to carry meanings as well as sounds.