To put it simple, 狗 is a common word, used in daily life, indicating a dog. But 犬 is a formal word, mostly in zoology, indicating canine animal category.
犬 is a very old character for dog, and thus is not really used anymore by itself. Some compound words still use this character to mean dog, but it won't be used by itself very often.
If you ever want to say "dog," just use 狗
Here are some examples of words that use 犬 (I think most of these words are pretty uncommon) 警犬 police dog 猎犬 hunting dog (猎狗 is actually more common) 犬吠 dog's bark 狂犬 mad/rabid dog