"Casa" is a building. It also means "home" in expressions like "Vamos a casa" = "Let's go home".
"Hogar" literally means "home", but it is not used that frequently. When you say "hogar", you are talking about where you live (your house), but it could also be your city or your country. "Casa" could be used this way too, but "hogar" has a special positive connotation; it usually means that you feel safe there.
Put it another way: "Casa" could act as "hogar", but "hogar" can scarcely act as "casa" (possible, but rare)
In conclusion, they are similar words but "casa" is much more frequent. "Hogar" would be used when you wanted to stress positive feelings about the place you are talking about.
Hope this helps :)