Definition
Isolation means keeping people who already have the illness away from everyone else. Quarantine means keeping people who aren't sick yet, but may have been exposed, apart for a while. The first protects others from people who are known to be sick. The second deals with people whose results aren't in yet.
Why hold someone for days when they aren't even sick?
Say you spent a long time in a room with a sick person. You have no fever and no cough. Yet you're told to stay home for several days.
That's because feeling fine right now doesn't mean you weren't infected. Even after you catch something, it takes days for symptoms to show up. That gap is called the incubation period. Until it passes, there's no good way to tell which side you're on.
So this time isn't a punishment. It's time spent waiting for the answer to show up. If nothing happens by the end of those days, you're released.
The two ideas differ in who they target. Isolation separates people who already have the illness. Quarantine keeps apart people who aren't sick yet but may have been exposed.
Where do the "few days" come from?
The number of days comes from the incubation period. But health officials look at the long end of the range, not the average. If you set the period to the average, people whose symptoms show up later would start getting sick after their quarantine ended. Even with the long end, a rare person might still develop symptoms later than that. And the long end is only a starting point. The agency sets the final length after weighing other things, such as whether testing is used and how much burden it puts on society. That's why the length can change for the same illness depending on the situation.
This is also why the length differs from one illness to another. If the incubation period is short, the answer shows up in a few days. If it's long, you have to watch for that much longer.
You also have to watch the contagion clock. The incubation period only tells you when symptoms appear. When someone starts spreading the illness is a separate question. With illnesses where the spreading clock starts before symptoms do, waiting for symptoms and then separating people is too late. The chain of infection has already moved on.
It's different when people only start spreading the illness after symptoms appear. Then you can watch for symptoms and separate only the people who show them, and the chain breaks. That's why the weight of keeping not-yet-sick people apart differs from one illness to another.
A bit more precisely
In everyday Korean, both ideas are often called gyeokri (격리), which just means "separation." Even keeping an exposed person at home is commonly called self-gyeokri. So the name alone doesn't tell them apart. You have to look at who the target is: someone who is already sick, or someone whose results aren't in yet.
The word "quarantine" comes from the Italian for "forty days." It goes back to old port cities that held arriving ships offshore for a while when a plague was going around. Records say the wait started at thirty days and later grew to forty. Why forty isn't clear. The Korean word geomyeok (검역, 檢疫) was a term coined later, using Chinese characters, to translate that Western word. Its characters have no "forty" in them. They mean inspecting for epidemic disease. So in Korea, geomyeok can also refer to the whole set of inspection and monitoring procedures at airports and seaports. The narrower meaning used in this article matches the English word quarantine.
Those forty days weren't a number measured from an incubation period. Today, the number of days is set by using that illness's incubation period as the starting point, so it differs from one illness to another.
The tree analogy works up to a point. In both cases, a fire already burning and a spark that might have landed are handled separately. But with a tree, you can look and see whether it caught fire. With people, there's a stretch of time when it doesn't show on the outside whether they've already been infected.
Common misconceptions
Quarantine and isolation mean the same thing.
They target different people. Isolation separates people who already have the illness. Quarantine keeps apart people who aren't sick yet but may have been exposed.
The number of days is just a number that a country or agency picks for convenience.
It isn't picked at random. The starting point is the illness's incubation period, especially the long end of its range. But the agency also weighs things like whether testing is used and how much burden it puts on society, so the length can get shorter or longer for the same illness depending on the situation.
There's no reason to keep people apart if they have no symptoms.
There's a gap between getting infected and showing symptoms, and with some illnesses people start spreading it before symptoms appear. If you only watch for symptoms, the chain of infection moves on in the meantime.
Where you meet it
Someone who shared a room with a sick person has no symptoms but stays home for several days to be watched. That's quarantine.
A person confirmed to have the illness stays apart from others until they're no longer likely to spread it, then is released. That's isolation.
In one sentence
Isolation separates people who are already sick. Quarantine keeps apart people who aren't sick yet but may have been exposed, for a period set from the incubation period.