They both mean country don't they? I saw this phrase: 国家公安局部長。 When I looked it up 国家, the definition was just "country". So I'm not understanding the nuance between the two words.
I am sure someone could give a more comprehensive answer but it is usually the same as the difference between nation/state and country in English eg
国 also has a few "domestic" uses, which I imagine go back to the time when people in Japan rarely travelled overseas and they might refer to areas of Japan as "countries" (this is somewhat paralleled in other "nations" such as the UK where people in regions such as Cornwall might see themselves apart from the rest of the nation, even though they are not referred to as countries such as Scotland or Wales) hence in Japanese :
And of course there are parts of Japan with 国 in the name such as 中国 ＆ 四国