Kanji is the Japanese word for the written characters that are said to have been created in China several thousand years ago, though nobody knows exactly where or when. The way kanji got started was from pictures people drew. Over a long period of time the shape of the pictures changed, and so most of them no longer look like the original objects. But they still stand for whole words or parts of words.
Kanji were brought to Japan about 1,800 years ago. There are many thousands of them; one big dictionary has about 50,000. But people don't actually use that many. There are about 2,136 of them on the list the government has drawn up for regular use. Elementary school children learn 1,006 by the end of sixth grade. Middle school students learn to write sentences with these 1,006 and learn to read another 1,130.
In addition to kanji, which have meaning and stand for words or parts of words, the Japanese have two sets of characters for writing sounds. Hiragana have rounded strokes, while katakana use mostly straight lines. They were developed during the Heian period (794-1185) from the kanji that came to be used for certain sounds in the Japanese language. There are 46 characters in each of these two sets, which are called syllabaries, because they stand for syllables (usually including both a consonant and a vowel, like "ka"). Combined with some extra dots used to mark changes of the original sounds, these 46 characters are enough to express all the sounds of modern Japanese.
Hiragana are used together with kanji to write ordinary Japanese words. Katakana are used mainly to write words borrowed from other languages and names of foreign people and places as well as to denote sounds and cries of animals.