>>11879278Both are represent the same syllable (katakana has a few extra combination you will never see in hiragana.)
Both are derivative from Kanji sometime the same kanji gave both hiragana and katakana something two different kanji are at the origins, one for hiragana one for katakana.
Katakana is used, for foreign words (other than Chinese), highlight, scientific words, contractions, given names (can also be hiragana), slangs, made-up words like pokemon's name, animals, plants, to represent a robot voice or a childish voice, etc.
Hiragana is always used for grammar and 95% of the Japanese words that are not in kanji