Japanese Writing Systems
Japanese has three distinct writing systems. Borrowed from China in the sixth century AD, the first is known in Japan as kanji, which means 'Han characters' (Han being China). Over the nearly fifteen hundred years since their arrival in Japan they have changed from their original Chinese origins. For instance, the stroke order of kanji in Japan is different from the stroke order of the original Chinese characters.
After World War II the Japanese government cut down the number of official kanji in use in Japan to just under 2,000 characters. In order for someone to be able to read Japanese well they must master all 2,000 characters since those are the only ones to appear in print. There are additional kanji used for the names of people. Also, kanji have many readings. They always have at least two readings: a Chinese reading (called an 'on yomi') and a Japanese reading ('kun yomi').
Hiragana and Katakana
The other two writing systems, hiragana and katakana, are phonetic. This means the symbols of the writing system correlate directly with a sound in the language. For example the hiragana for the Japanese sound 'ha' would be 'は.' There is usually no other way for a phonetic symbol to be pronounced (although in the case of 'ha' it can also be pronounced 'wa' if certain conditions are met). Katakana is the same way.
Both hiragana and katakana are derived from kanji. Hiragana is derived from the grass style calligraphy of more complicated kanji. Grass style calligraphy is like Chinese cursive. Katakana is derived from radicals of certain kanji. A radical is a simplified version of a kanji that is combined with other kanji to provide a context for meaning. For example: 川 is river in kanji. Its radical form is the three left most strokes of this kanji: 治. Katakana are further simplified versions of these radicals.
In theory, hiragana is supposed to be used only for words of Japanese origin and katakana is only supposed to be used for words of foreign origin. In practice, however, they are both used for native Japanese words and foreign loan words.
In order to learn written Japanese one must learn all three writing systems. When reading Japanese you will often encounter all three in the same sentence.