A good general rule to follow in terms of 띄어쓰기 (ttuieosseugi) - spacing - is that if a word can stand on it's own, then there should be a space.
저는 한국 사람입니다.
(jeo-neun hanguk saram-imnida)
This sentence has 한국 and 사람 which are two distinct and independent words, which can stand on their own. So therefore, they should have a space between them.
Another general rule to follow is, whenever you use a particle (은/는, 이/가, 을/를, 에, 에서, 으로, 등등), there should be a space after that.
And the word 이다 (ida) attaches to the word right before it. Another general rule. Take a look at the example above