As a general rule, Katakana is used for foreign words.
For example, the word "camera" is pronounced as "Kamera" in Japanese and we write it in Katakana since it's not a native Japanese word.
かめら Hiragana
カメラ Katakana
While you're learning Japanese, you'll probably notice that Katakana is actually used for native words too.
For example, the word "Kawaii", which means cute, is usually written in Hiragana:
かわいい
since it's a native Japanese word.
But we often see it written in Katakana as well:
カワイイ
The reason for this is that writing some words in Katakana can give readers certain impressions that are different from when we read them in Hiragana.
As a Japanese beginner, you don't really need to worry too much about it but I will still talk about it later when we learn Katakana.