Originally, Japanese had no writing system. During cross-cultural exchanges in the 3rd through 9th centuries, Koreans taught Japanese people the Chinese writing system and introduced Buddhism. From there, Japanese people began to write in Chinese and then eventually adapted Chinese morphographs into phonographic symbols (man'yogana). Japanese women then adapted hiragana from those morphographic symbols. Around the same time, Buddhist monks (men) derived katakana from Buddhist scripts.
The curved nature of hiragana is associated with women, while the angular nature of katakana is associated with men.
Today, hiragana is used with Japanese words (for conjugation and sentence particles), while katakana is used for transliterating foreign words.